From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Euler Taveira <euler@eulerto.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: improve performance of pg_dump with many sequences
Date: Wed, 17 Jul 2024 13:48:00 -0500
Message-ID: <ZpgR4OMpbekeja_n@nathan> (raw)
In-Reply-To: <Zpc5HGb7yDfTNDy5@nathan>
References: <20240503025140.GA1227404@nathanxps13>
<Zo2LdwUamOq6HzIU@nathan>
<0a0f4d52-ab75-4d69-abe8-5713bf70eee6@app.fastmail.com>
<Zo8Fl53vBVS1Cnmt@nathan>
<d7f5942e-00ba-4d90-9bac-f0b2b7092dc4@app.fastmail.com>
<ZpCQTZtXL85P5SaT@nathan>
<Zpbnz4P13W7WICj-@nathan>
<ZpcsrAcClLt7AwdI@paquier.xyz>
<Zpc5HGb7yDfTNDy5@nathan>
On Tue, Jul 16, 2024 at 10:23:08PM -0500, Nathan Bossart wrote:
> On Wed, Jul 17, 2024 at 11:30:04AM +0900, Michael Paquier wrote:
>> Yeah, I have bumped on the same issue. In the long term, I also think
>> that we'd better have pg_sequence_last_value() return a row with
>> is_called and the value scanned. As you say, it won't help except
>> when upgrading from versions of Postgres that are at least to v18,
>> assuming that this change gets in the tree, but that would be much
>> better in the long term and time flies fast.
>
> AFAICT pg_sequence_last_value() is basically an undocumented internal
> function only really intended for use by the pg_sequences system view, so
> changing the function like this for v18 might not be out of the question.
> Otherwise, I think we'd have to create a strikingly similar function with
> slightly different behavior, which would be a bizarre place to end up.
On second thought, I worry that this change might needlessly complicate the
pg_sequences system view. Maybe we should just add a
pg_sequence_get_tuple() function that returns everything in
FormData_pg_sequence_data for a given sequence OID...
--
nathan
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-hackers@postgresql.org
Cc: nathandbossart@gmail.com, michael@paquier.xyz, euler@eulerto.com
Subject: Re: improve performance of pg_dump with many sequences
In-Reply-To: <ZpgR4OMpbekeja_n@nathan>
* 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