add --sequence-data to pg_dumpall

Lists: pgsql-hackers
From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: add --sequence-data to pg_dumpall
Date: 2025-04-29 20:55:08
Message-ID: aBE8rHFo922xQUwh@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

I noticed that I forgot to add --sequence-data to pg_dumpall in commit
9c49f0e, which added the same option to pg_dump. This option is primarily
intended for use by pg_upgrade, so we will need it if/when we teach
pg_upgrade to use pg_dumpall to dump the databases. (Right now pg_upgrade
directly calls pg_dump on each database.)

Assuming we want this patch, should we apply it to v18? It's arguably an
oversight in the pg_dump --sequence-data commit, and pg_dumpall will just
pass the option through to pg_dump, but otherwise there's not a really
strong reason it can't wait.

--
nathan

Attachment Content-Type Size
v1-0001-pg_dumpall-Add-sequence-data.patch text/plain 3.1 KB

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: add --sequence-data to pg_dumpall
Date: 2025-04-30 00:29:59
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Apr 29, 2025 at 03:55:08PM -0500, Nathan Bossart wrote:
> I noticed that I forgot to add --sequence-data to pg_dumpall in commit
> 9c49f0e, which added the same option to pg_dump. This option is primarily
> intended for use by pg_upgrade, so we will need it if/when we teach
> pg_upgrade to use pg_dumpall to dump the databases. (Right now pg_upgrade
> directly calls pg_dump on each database.)
>
> Assuming we want this patch, should we apply it to v18? It's arguably an
> oversight in the pg_dump --sequence-data commit, and pg_dumpall will just
> pass the option through to pg_dump, but otherwise there's not a really
> strong reason it can't wait.

This reminds me of, that fixed a similar defect in pg_dumpall
following the addition of an option in pg_dump where the former was
forgotten:
https://www.postgresql.org/message-id/YKHC%2BqCJvzCRVCpY%40paquier.xyz

I agree with applying that to v18 now and treat it as a defect rather
than wait for v19 and treat this patch as a new feature. Bonus points
for the patch being straight-forward.
--
Michael


From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org, tomas(at)vondra(dot)me, hlinnaka(at)iki(dot)fi
Subject: Re: add --sequence-data to pg_dumpall
Date: 2025-04-30 19:52:27
Message-ID: aBJ_e5RXk92N5-U1@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Apr 30, 2025 at 09:29:59AM +0900, Michael Paquier wrote:
> On Tue, Apr 29, 2025 at 03:55:08PM -0500, Nathan Bossart wrote:
>> Assuming we want this patch, should we apply it to v18? It's arguably an
>> oversight in the pg_dump --sequence-data commit, and pg_dumpall will just
>> pass the option through to pg_dump, but otherwise there's not a really
>> strong reason it can't wait.
>
> This reminds me of, that fixed a similar defect in pg_dumpall
> following the addition of an option in pg_dump where the former was
> forgotten:
> https://www.postgresql.org/message-id/YKHC%2BqCJvzCRVCpY%40paquier.xyz
>
> I agree with applying that to v18 now and treat it as a defect rather
> than wait for v19 and treat this patch as a new feature. Bonus points
> for the patch being straight-forward.

Since there's precedent, I'll plan on committing this in the next few days
unless someone objects. I've added the rest of the RMT to this thread,
too, just in case.

--
nathan


From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org, tomas(at)vondra(dot)me, hlinnaka(at)iki(dot)fi
Subject: Re: add --sequence-data to pg_dumpall
Date: 2025-05-06 16:39:33
Message-ID: aBo7RT7VRrOA5QWA@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Apr 30, 2025 at 02:52:27PM -0500, Nathan Bossart wrote:
> Since there's precedent, I'll plan on committing this in the next few days
> unless someone objects. I've added the rest of the RMT to this thread,
> too, just in case.

I brought this up in the RMT meeting today, and everyone was fine with
committing it for v18. I'll plan on doing so later this week.

--
nathan


From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org, tomas(at)vondra(dot)me, hlinnaka(at)iki(dot)fi
Subject: Re: add --sequence-data to pg_dumpall
Date: 2025-05-07 18:41:57
Message-ID: aBupdSaadG-EUzYC@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, May 06, 2025 at 11:39:33AM -0500, Nathan Bossart wrote:
> I brought this up in the RMT meeting today, and everyone was fine with
> committing it for v18. I'll plan on doing so later this week.

Committed.

--
nathan