Re: improve performance of pg_dump with many sequences
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Euler Taveira <euler@eulerto.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-01-07T23:13:48Z
Lists: pgsql-hackers
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. regards, tom lane
Commits
-
pg_dump: Fix gathering of sequence information.
- 7a485bd641b7 19 (unreleased) landed
- 39d55557661f 18.2 landed
-
Improve performance of dumpSequence().
- 68e962998598 18.0 landed
-
Improve performance of dumpSequenceData().
- bd15b7db489d 18.0 landed
-
Introduce pg_sequence_read_tuple().
- c8b06bb969bf 18.0 landed
-
Parse sequence type and integer metadata in dumpSequence().
- 23687e925f94 18.0 landed