Skip to content

Commit

Permalink
Fix SQL introspection after inplace upgrade
Browse files Browse the repository at this point in the history
We need to refresh the views after the upgrade.
Fixes #8155.
  • Loading branch information
msullivan committed Dec 20, 2024
1 parent 73c212a commit dea29c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions edb/server/inplace_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

from edb.pgsql import common as pg_common
from edb.pgsql import dbops
from edb.pgsql import metaschema
from edb.pgsql import trampoline


Expand Down Expand Up @@ -273,6 +274,15 @@ async def _upgrade_one(
except Exception:
raise

# Refresh the pg_catalog materialized views
current_block = dbops.PLTopBlock()
refresh = metaschema.generate_sql_information_schema_refresh(
backend_params.instance_params.version
)
refresh.generate(current_block)
patch = current_block.to_string()
await ctx.conn.sql_execute(patch.encode('utf-8'))

new_local_spec = config.load_spec_from_schema(
schema,
only_exts=True,
Expand Down

0 comments on commit dea29c6

Please sign in to comment.