Skip to content

Commit c5533f4

Browse files
rooftopcellistdsavineau
authored andcommitted
Use --no-acl flag when restoring to exclude GRANT and REVOKE commands
This avoids running in to the following error when pg_restore is run as the application db user from the db-management pod: pg_restore: error: could not execute query: ERROR: must be member of role postgres Command was: ALTER SCHEMA public OWNER TO postgres;
1 parent 78864b3 commit c5533f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/restore/tasks/postgres.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
- name: Set pg_restore command
8484
set_fact:
8585
pg_restore: >-
86-
pg_restore --clean --if-exists
86+
pg_restore --clean --if-exists --no-owner --no-acl
8787
-U {{ awx_postgres_user }}
8888
-h {{ resolvable_db_host }}
8989
-d {{ awx_postgres_database }}

0 commit comments

Comments
 (0)