pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Barron <david.barron@zencos.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Backup strategy
Date: Wed, 28 Feb 2024 11:48:54 -0500
Message-ID: <2318660.1709138934@sss.pgh.pa.us> (raw)
In-Reply-To: <PH0PR22MB335234B47EAEE56DE68134E6E9582@PH0PR22MB3352.namprd22.prod.outlook.com>
References: <PH0PR22MB335225F34C289A7A1D8E6B38E9582@PH0PR22MB3352.namprd22.prod.outlook.com>
	<2317287.1709138280@sss.pgh.pa.us>
	<PH0PR22MB335234B47EAEE56DE68134E6E9582@PH0PR22MB3352.namprd22.prod.outlook.com>

David Barron <david.barron@zencos.com> writes:
> If, for example, table a has a constraint that references rows in table b, table b has to be restored first, but pg_dump doesn't take that into account.

Yes it does: it doesn't restore foreign key constraints until after
all the data is loaded.  What I suspect is that by "constraint" you
mean some handmade hack like a trigger that looks at other tables.
But without details about what you're doing, it's hard to recommend
solutions.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <2318660.1709138934@sss.pgh.pa.us>
Permalink:  ../2318660.1709138934@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2318660.1709138934@sss.pgh.pa.us

 · 

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: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.barron@zencos.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Backup strategy
  In-Reply-To: <2318660.1709138934@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox