public inbox for [email protected]  
help / color / mirror / Atom feed
From: 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: Fri, 7 Feb 2025 07:32:28 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Hi Adrian,

> On 6 Feb 2025, at 17:31, Adrian Klaver <[email protected]> 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







view thread (3+ messages)

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