Re: Backup strategy

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Backup strategy
Date: 2024-02-28 18:22:14
Message-ID: CANzqJaAauOmkQd7uxTSN+GpnkeK38Zgu6MtN3M8+EBfxX4kruQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Feb 28, 2024 at 11:23 AM David Barron <david(dot)barron(at)zencos(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Siraj G 2024-02-29 01:06:26 Need help - Unable to grant a role
Previous Message David Barron 2024-02-28 16:53:35 RE: Backup strategy