add migration for pg_create_subscription grant#1514
Conversation
migrations/db/migrations/20250402093753_grant_subscription_to_postgres_16_and_above.sql
Outdated
Show resolved
Hide resolved
|
Please let's merge #1521 before this one. We're adding new tests and we need to ensure this one is passing. (I can help to modify tests if something fails here). |
|
#1521 was merged, please rebase here. |
b1d303c to
0b18508
Compare
@steve-chavez just did a rebase on develop and push now on this branch |
|
Will get this into staging to test by tomorrow hopefully @encima |
There was a problem hiding this comment.
@encima this PR will likely need to have this test split up for the major versions https://github.com/supabase/postgres/blob/feat/subscription-create/nix/tests/sql/roles.sql
as we have done for instance with https://github.com/supabase/postgres/blob/feat/subscription-create/nix/tests/sql/z_15_ext_interface.sql and z_17_ext_interface.sql z_orioledb-17_ext_interface.sql for example
This will help the change pass the Nix CI build where these tests are run
@steve-chavez might be interested in this too as he had comments in the test that read
-- TODO: this exclusion is to maintain compat with pg17, we should cover it
|
@encima might need to refactor the tests first. Looking into that now |
0b18508 to
170d405
Compare
What kind of change does this PR introduce?
Feature
What is the current behavior?
Non superusers are unable to create subscriptions
What is the new behavior?
For 16 and above, this is possible as long as
pg_create_subscriptionis granted by superuser to a roleAdditional context
Unsure if handling the version check in the migration is the best choice but it is the most automated way