Re: libc to libicu via pg_dump/pg_restore?

From: Paul Foerster <paul(dot)foerster(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: libc to libicu via pg_dump/pg_restore?
Date: 2025-02-13 16:17:58
Message-ID: 5A9148A0-CF9C-4841-A9C0-D7E299AC4ADD@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Adrian,

sorry for the late answer. I'm just too busy.

> On 7 Feb 2025, at 17:19, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-02-13 16:40:48 Re: libc to libicu via pg_dump/pg_restore?
Previous Message Dominique Devienne 2025-02-13 15:25:40 Re: Best Approach for Swapping a Table with its Copy