Re: Backup strategy - Mailing list pgsql-admin

From Ron Johnson
Subject Re: Backup strategy
Date
Msg-id CANzqJaAauOmkQd7uxTSN+GpnkeK38Zgu6MtN3M8+EBfxX4kruQ@mail.gmail.com
Whole thread Raw
In response to Backup strategy  (David Barron <david.barron@zencos.com>)
List pgsql-admin
On Wed, Feb 28, 2024 at 11:23 AM David Barron <david.barron@zencos.com> wrote:

Good day all

 

I’m responsible for a couple of databases that have constraints and indexes on most, if not all, of the tables, which means that the tables have to be backed up and restored in the correct order to take the constraints into account.  But pg_dump and pg_restore don’t take that into account, so when doing restores I was running into errors.  Hopefully that is clear.


Clear, but, like Tom said, makes little sense.  

Why?  Lots of databases (including ours) have scads of foreign key constraints and triggers.  If pg_restore didn't "take that into account", people would have been hollering about that 20 years ago.

pg_restore works perfectly every time I restore the whole database.  

Thus... show a verbose whole database pg_dump and pg_restore, with error messages.

pgsql-admin by date:

Previous
From: David Barron
Date:
Subject: RE: Backup strategy
Next
From: Siraj G
Date:
Subject: Need help - Unable to grant a role