Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SQL introspection after inplace upgrade #8159

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

msullivan
Copy link
Member

We need to refresh the views after the upgrade.
Fixes #8155.

@msullivan msullivan force-pushed the A-inplace-fix-sql-views branch 2 times, most recently from 603c7ad to 9a121c4 Compare December 21, 2024 04:57
msullivan added a commit that referenced this pull request Jan 2, 2025
Multiple of our invested constraints were being given the same oid
which caused problems.

One specific problem was generating bogus pgdumps, which annoyingly
mostly only showed up in inplace-upgrade tests:
https://github.com/edgedb/edgedb/actions/runs/12442350513/job/34740389082?pr=8159

The problem was that pg_get_constraintdef was returning a constraint
definition for the "wrong" object; the defining query would return 3
rows, and postgres silently returns the first.

Fix this by adding some bits to the oid separate from the uuid of the
link, and test that the fix works by putting the body of
pg_get_constraintdef into a subquery.

This hopefully will unblock #8159.
@msullivan msullivan force-pushed the A-inplace-fix-sql-views branch from 1082f77 to 8d73b18 Compare January 2, 2025 23:51
@msullivan msullivan added the to-backport-6.x PRs that *should* be backported to 6.x label Jan 2, 2025
msullivan added a commit that referenced this pull request Jan 3, 2025
Multiple of our invested constraints were being given the same oid
which caused problems.

One specific problem was generating bogus pgdumps, which annoyingly
mostly only showed up in inplace-upgrade tests:

https://github.com/edgedb/edgedb/actions/runs/12442350513/job/34740389082?pr=8159

The problem was that pg_get_constraintdef was returning a constraint
definition for the "wrong" object; the defining query would return 3
rows, and postgres silently returns the first.

Fix this by adding some bits to the oid separate from the uuid of the
link, and test that the fix works by putting the body of
pg_get_constraintdef into a subquery.

This hopefully will unblock #8159.
@msullivan msullivan force-pushed the A-inplace-fix-sql-views branch from 8d73b18 to 3df77dc Compare January 3, 2025 00:14
msullivan added a commit that referenced this pull request Jan 3, 2025
Multiple of our invested constraints were being given the same oid
which caused problems.

One specific problem was generating bogus pgdumps, which annoyingly
mostly only showed up in inplace-upgrade tests:

https://github.com/edgedb/edgedb/actions/runs/12442350513/job/34740389082?pr=8159

The problem was that pg_get_constraintdef was returning a constraint
definition for the "wrong" object; the defining query would return 3
rows, and postgres silently returns the first.

Fix this by adding some bits to the oid separate from the uuid of the
link, and test that the fix works by putting the body of
pg_get_constraintdef into a subquery.

This hopefully will unblock #8159.
msullivan added a commit that referenced this pull request Jan 3, 2025
Multiple of our invested constraints were being given the same oid
which caused problems.

One specific problem was generating bogus pgdumps, which annoyingly
mostly only showed up in inplace-upgrade tests:


https://github.com/edgedb/edgedb/actions/runs/12442350513/job/34740389082?pr=8159

The problem was that pg_get_constraintdef was returning a constraint
definition for the "wrong" object; the defining query would return 3
rows, and postgres silently returns the first.

Fix this by adding some bits to the oid separate from the uuid of the
link, and test that the fix works by putting the body of
pg_get_constraintdef into a subquery.

This hopefully will unblock #8159.
@msullivan msullivan merged commit 4472152 into master Jan 3, 2025
28 checks passed
@msullivan msullivan deleted the A-inplace-fix-sql-views branch January 3, 2025 03:15
msullivan added a commit that referenced this pull request Jan 3, 2025
We need to refresh the views after the upgrade.
Fixes #8155.
@msullivan msullivan added backported-6.x PRs that *have* been backported to 6.x and removed to-backport-6.x PRs that *should* be backported to 6.x labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-6.x PRs that *have* been backported to 6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

materialized SQL introspection may have broken in-place upgrades
3 participants