Re: BUG #19086: pg_dump --data-only selects and do not uses index definitions for the dumped tables.
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-10-14T22:03:12Z
Lists: pgsql-bugs
On Tue, Oct 14, 2025 at 03:50:15PM -0400, Tom Lane wrote: > Even if it's been seen in the field, it hardly qualifies as a > justification for complicating pg_dump's behavior. There's no reason > to think that catalog corruption preferentially affects indexes, or > does so in this particular way. Should we also not collect data on > functions, types, etc etc? FWIW the getIndexes() query does tend to be one of the slowest, even with intact system indexes. I've no concrete proposals, but there might be some room for improvement. I don't think we gain all that much by simply avoiding the query in probably-somewhat-rare use-cases. IMHO it ought to be reworked for efficiency. -- nathan