Re: Question about pg_dump + pg_restore + pg_toast - Mailing list pgsql-admin

From Ron Johnson
Subject Re: Question about pg_dump + pg_restore + pg_toast
Date
Msg-id CANzqJaCELFTyBG1_u-5dM61mJ7d==OtZ4YOwhirO3Mvb3+hirg@mail.gmail.com
Whole thread Raw
In response to Re: Question about pg_dump + pg_restore + pg_toast  (Edwin UY <edwin.uy@gmail.com>)
Responses Re: Question about pg_dump + pg_restore + pg_toast
List pgsql-admin

1. Why would you need to edit the dump file?
2. It's not 2013 anymore: Use multiple threads when backing up!

On Sat, Mar 1, 2025 at 3:54 PM Edwin UY <edwin.uy@gmail.com> wrote:
If need be, do I manually edit the dumpfile using something like vi?

On Tue, Feb 25, 2025 at 12:06 PM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
Run the PG12 pg_dump just before the pg_upgrade.

Forward compatibility in maintenance utilities is (usually) guaranteed.  Backwards compatibility (which is what you want)?  Not so much.

On Mon, Feb 24, 2025 at 4:31 PM Edwin UY <edwin.uy@gmail.com> wrote:
Yikes, I thought it is alright so long as I use the latest version of pg_dump and restore.
Thanks for the warning.

On Tue, Feb 25, 2025 at 12:35 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Mon, 2025-02-24 at 22:19 +1300, Edwin UY wrote:
> We are upgrading this database from v12 to v16 and we want to do a dump of it in case we decided to do a restore from v16 to v12.
> SO, after the upgrade, in case we want to rollback to v12, we will do a pg_dump using v16 and then using v12 pg_restore

Be warned that downgrade is not supported and restoring the dump to v12 might well fail.
You might have to manually edit the dump file until you can restore it without errors.

Yours,
Laurenz Albe



--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Question about pg_dump + pg_restore + pg_toast
Next
From: Laurenz Albe
Date:
Subject: Re: Question about pg_dump + pg_restore + pg_toast