On 5/22/19, 12:16 AM, "Michael Paquier" <mich...@paquier.xyz> wrote: > Attached is a patch to fix that, so as pg_dumpall does not complain > when piling up GRANT commands using WITH GRANT OPTION. Are there any > complains to apply that down to 9.6?
The patch looks good to me. > As the problem is kind of different than the database case, I wanted > to spawn anyway a new thread, but I got a bonus question: what would > it take to support pg_init_privs for databases and tablespaces? If we > could get that to work, then all the ACL-related queries built for all > objects could make use of buildACLQueries(), which would avoid extra > diffs in the dump code for dbs and tbspaces. A bit of digging led me to the commit that removed databases and tablespaces from pg_init_privs [0] and to a related thread [1]. IIUC the problem is that using pg_init_privs for databases is complicated by the ability to drop and recreate the template databases. Nathan [0] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=47f5bb9f539a7fff089724b1cbacc31613031895 [1] https://www.postgresql.org/message-id/9f25cb66-df67-8d81-ed6a-d18692a03410%402ndquadrant.com