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;
This commit is contained in:
Christian M. Adams
2025-10-09 15:34:47 -04:00
committed by Dimitri Savineau
parent 78864b3653
commit c5533f47c1

View File

@@ -83,7 +83,7 @@
- name: Set pg_restore command
set_fact:
pg_restore: >-
pg_restore --clean --if-exists
pg_restore --clean --if-exists --no-owner --no-acl
-U {{ awx_postgres_user }}
-h {{ resolvable_db_host }}
-d {{ awx_postgres_database }}