Re: Question about pg_dump + pg_restore + pg_toast

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Question about pg_dump + pg_restore + pg_toast
Date: 2025-03-02 00:44:27
Message-ID: CANzqJaCELFTyBG1_u-5dM61mJ7d==OtZ4YOwhirO3Mvb3+hirg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)uy(at)gmail(dot)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(at)gmail(dot)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(dot)uy(at)gmail(dot)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(dot)albe(at)cybertec(dot)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!

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2025-03-02 06:39:13 Re: Question about pg_dump + pg_restore + pg_toast
Previous Message Ron Johnson 2025-03-02 00:40:14 Re: Question about pg_dump + pg_restore + pg_toast