public inbox for [email protected]
help / color / mirror / Atom feedFrom: Paul Foerster <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: pgsql-general list <[email protected]>
Subject: Re: libc to libicu via pg_dump/pg_restore?
Date: Thu, 13 Feb 2025 17:17:58 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Hi Adrian,
sorry for the late answer. I'm just too busy.
> On 7 Feb 2025, at 17:19, Adrian Klaver <[email protected]> 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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: libc to libicu via pg_dump/pg_restore?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox