Hi Adrian, sorry for the late answer. I'm just too busy. > On 7 Feb 2025, at 17:19, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote: > >> With create database <options> being "template template0", this is what my script does. But I need the -cC options for pg_restore to get ACLs back. Leaving out either one of them will not get me the ACLs back. > > That does not make sense. > > Are there ACLs(privileges) in the database at all? > > What is the pg_dump command you are running? I use this pg_dump command: pg_dump -Fc -Z1 --quote-all-identifiers -b "${PGDATABASE}" -f ${dumpBase}/${clusterName}.${PGDATABASE}.dump.gz >${PGDATABASE}.out 2>${PGDATABASE}.err & The command is embedded in a Bash script for loop that loops PGDATABASE over all database names inside the cluster and launches pg_dump as a background job. It then waits for all jobs to complete ("wait" command). dumpBase is just the destination directory. If I don't use -cC, i.e. both, then the Access privileges will not be restored. Checking with \l just shows an empty field as usual for a newly created database. This happens at least with 17.2. I didn't check that with 17.3 yet. I agree, from how I understood the docs I should be able to only use -C and not -c. As for the data inconsistency, PostgreSQL is right. I found out that some clever person did a "alter table … disable trigger all" on a table and then manipulated data. That broke referential integrity. So, this case is closed. Cheers, Paul