Search Postgresql Archives

Re: libc to libicu via pg_dump/pg_restore?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Adrian,

> On 6 Feb 2025, at 17:31, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
> 
> 1) Log into postgres database and do:
> 
> a) DROP DATABASE mydb;
> b) CREATE DATABASE mydb <options>;
> 
> 2) pg_restore -d mydb mydb.dump.gz

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.

>> pg_restore: error: could not execute query: ERROR:  insert or update on table "table_1" violates foreign key constraint "..._fk"
>> DETAIL:  Key (dokument_id)=(1000033680) is not present in table "...".
> 
> Is dokument_id an integer field?

Yes, it's a bigint.

> In a follow post you said:
> 
> "Everything works for all databases. Only this one has that problem."
> 
> Do you mean you made the same libc --> icu change on the other databases with no errors?

Yes, I have that PostgreSQL 15.10 cluster with locale provider libc with about 40 databases. I initdb'ed a new PostgreSQL 17.2 cluster with icu as locale provider and did a "create database ... template template0" for all about 40 databases. Then I did the mentioned pg_restore for each of them as a parallel background job in the shell.

The whole database cluster is about 1.2 TB in size so I have to find ways to restore as many databases in parallel as possible. However pg_restore only fails on this single database. All others in that database cluster work fine.

Cheers
Paul







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux