Skip to content

Commit 100ae3e

Browse files
authored
fix: set postgres role for pg_dump (#3958)
1 parent 933798a commit 100ae3e

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

pkg/migration/scripts/dump_data.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ echo "SET session_replication_role = replica;
2222
pg_dump \
2323
--data-only \
2424
--quote-all-identifier \
25+
--role "postgres" \
2526
--exclude-schema "${EXCLUDED_SCHEMAS:-}" \
2627
--exclude-table "auth.schema_migrations" \
2728
--exclude-table "storage.migrations" \

pkg/migration/scripts/dump_role.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export PGDATABASE="$PGDATABASE"
1919
# - do not alter membership grants by supabase_admin role
2020
pg_dumpall \
2121
--roles-only \
22+
--role "postgres" \
2223
--quote-all-identifier \
2324
--no-role-passwords \
2425
--no-comments \

pkg/migration/scripts/dump_schema.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export PGDATABASE="$PGDATABASE"
2525
pg_dump \
2626
--schema-only \
2727
--quote-all-identifier \
28+
--role "postgres" \
2829
--exclude-schema "${EXCLUDED_SCHEMAS:-}" \
2930
${EXTRA_FLAGS:-} \
3031
| sed -E 's/^CREATE SCHEMA "/CREATE SCHEMA IF NOT EXISTS "/' \

0 commit comments

Comments
 (0)