Re: can recs be transferred between DBs ?
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: dfgpostgres <dfgpostgres3@gmail.com>
Cc: pgsql-general@postgresql.org
Date: 2026-04-28T16:05:31Z
Lists: pgsql-general
On Tue, Apr 28, 2026 at 8:56 AM dfgpostgres <dfgpostgres3@gmail.com> wrote: > > The managers tell me that they want to restore "beta" back to the main DB. > I know I could do this with something like a perl script, making > connections to both DBs and transferring them over using select statements > in "beta_archive" and insert statements in the main DB. But is there a > better way, something inherent in PG SQL that allows me to do something > like this ? > > pg_dump / pg_restore are the core tools at your disposal. The ability to specify --inserts and --on-conflict-do-nothing on pg_dump in particular make at least attempting this against a copy of the backups quite appealing before trying to write a more targeted transfer script. David J.