8000 Add migration `with admin` option for permissions to administer roles for postgres role beyond pg16 by encima · Pull Request #1625 · supabase/postgres · GitHub
[go: up one dir, main page]

Skip to content

Add migration with admin option for permissions to administer roles for postgres role beyond pg16 #1625

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 9 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.0.1.090-orioledb"
postgres17: "17.4.1.040"
postgres15: "15.8.1.097"
postgresorioledb-17: "17.0.1.091-orioledb"
postgres17: "17.4.1.041"
postgres15: "15.8.1.098"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- migrate:up
DO $$
DECLARE
major_version INT;
BEGIN
SELECT current_setting('server_version_num')::INT / 10000 INTO major_version;

IF major_version >= 16 THEN
GRANT anon, authenticated, service_role TO postgres WITH ADMIN OPTION;
END IF;
END $$;

-- migrate:down
Loading
0