| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: improve performance of pg_dump with many sequences |
| Date: | 2026-01-07 23:27:31 |
| Message-ID: | aV7r43VN-kBR6T8v@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jan 07, 2026 at 06:13:48PM -0500, Tom Lane wrote:
> Nathan Bossart <nathandbossart(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2026-01-07 23:27:54 | Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement |
| Previous Message | Chao Li | 2026-01-07 23:26:37 | Re: nbtree: Cache operator family OID in _bt_setup_array_cmp |