pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 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, 7 Jan 2026 17:27:31 -0600
Message-ID: <aV7r43VN-kBR6T8v@nathan> (raw)
In-Reply-To: <1862355.1767827628@sss.pgh.pa.us>
References: <3585715.1721243507@sss.pgh.pa.us>
	<ZpiP3I6UVcgsCCWf@nathan>
	<3640163.1721275101@sss.pgh.pa.us>
	<ZpldUoP0XjHszExF@nathan>
	<Zpl7HywbF2qAkTVf@nathan>
	<ZqFJspSbieuTE4X0@nathan>
	<ZqpV5Sb7YWauwYnx@nathan>
	<2885944.1767029161@sss.pgh.pa.us>
	<aV7m7rTty4KAb-tF@nathan>
	<1862355.1767827628@sss.pgh.pa.us>

On Wed, Jan 07, 2026 at 06:13:48PM -0500, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> writes:
>> Before v18, pg_dump just ERRORs due to insufficient privileges on a
>> sequence.  IMHO that makes sense.  If you ask pg_dump to dump something you
>> don't have privileges on, I'd expect it to error instead of silently
>> skipping it.
> 
> That would be a fine argument were it not that collectSequences()
> tries to vacuum up the data for every sequence in the DB, whether
> the user has asked to dump them all or not.  In other places in
> pg_dump, we avoid such problems by restricting which tables we
> ask for data about ... but not here.

I meant that we could teach pg_dump to error in dumpSequenceData() if it
sees nulls for the sequence in question.

-- 
nathan





view thread (32+ messages)  latest in thread

Message-ID: <aV7r43VN-kBR6T8v@nathan>
Permalink:  ../aV7r43VN-kBR6T8v@nathan/
Also on:    postgresql.org/message-id/aV7r43VN-kBR6T8v@nathan

 · 

reply

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, tgl@sss.pgh.pa.us, michael@paquier.xyz, euler@eulerto.com
  Subject: Re: improve performance of pg_dump with many sequences
  In-Reply-To: <aV7r43VN-kBR6T8v@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