-
-
Notifications
You must be signed in to change notification settings - Fork 246
fix(tests): split prime.sql so non-superuser harnesses can source it #2175
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
2934984
fix(tests): split prime.sql so non-superuser harnesses can source it
utkarash2991 4279bcd
docs(supautils): cross-reference prime-superuser.sql in supautils.con…
utkarash2991 63491bb
docs(prime-superuser): document PG-15-only entries from supautils' ma…
utkarash2991 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| -- Superuser-only extensions for testing. | ||
| -- | ||
| -- These extensions are excluded from `supautils.privileged_extensions` (see | ||
| -- the "omitted because may be unsafe" comment in | ||
| -- `ansible/files/postgresql_config/supautils.conf.j2`). Hosted Supabase | ||
| -- projects cannot install them via non-superuser sessions, so this file is | ||
| -- loaded only by superuser-context harnesses: pg_regress (nix/checks.nix), | ||
| -- the docker-image-test, and the local migrate-tool. supadev's hosted | ||
| -- engines-with-smoke test sources `prime.sql` only. | ||
| -- | ||
| -- This file covers the "may be unsafe" extensions available in BOTH PG 15 | ||
| -- and PG 17 builds. Two more entries from the same list, `adminpack` and | ||
| -- `old_snapshot`, were removed from contrib in PG 17 and are loaded directly | ||
| -- by nix/tests/sql/z_15_ext_interface.sql for the PG 15 path. | ||
| -- | ||
| -- Keep this list in sync with the "may be unsafe" list in supautils.conf.j2, | ||
| -- minus adminpack and old_snapshot. | ||
|
|
||
| set client_min_messages = warning; | ||
|
|
||
| create extension if not exists amcheck; | ||
| create extension if not exists file_fdw; | ||
| create extension if not exists lo; | ||
| create extension if not exists pageinspect; | ||
| create extension if not exists pg_freespacemap; | ||
| create extension if not exists pg_surgery; | ||
| create extension if not exists pg_visibility; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at j2 file it has:
You're missing
adminpackandold_snapshothere, was that on purpose or didn't notice or something else?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both
adminpackandold_snapshotare not part of PG17/contrib, hence the sql doesn't have them. I have updated the comment inprime-superuser.sqlto document the asymmetry rather than introduce aDO ... EXCEPTIONworkaround. Let me know if you'd prefer the silently-skip version.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmlb
Yeah thats cool to do. I have created a Linear task to take that up in next PR: https://linear.app/supabase/issue/PSQL-1265/