pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: andrewbille@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19086: pg_dump --data-only selects and do not uses index definitions for the dumped tables.
Date: Tue, 14 Oct 2025 15:50:15 -0400
Message-ID: <1000041.1760471415@sss.pgh.pa.us> (raw)
In-Reply-To: <aO6mUj9H2WpEFylG@nathan>
References: <19086-871ff11017d03dc5@postgresql.org>
	<aO6mUj9H2WpEFylG@nathan>

Nathan Bossart <nathandbossart@gmail.com> writes:
> On Tue, Oct 14, 2025 at 08:13:52AM +0000, PG Bug reporting form wrote:
>> In case of system indexes corruption the collecting of index definitions can
>> take a really long time.

> I don't think this qualifies as a bug, but avoiding pg_dump queries when
> possible seems like a good idea.  Is this a hypothetical problem or
> something you've experienced?

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?

> Also, we need to be certain that nothing getIndexes() gathers is ever used
> for --data-only dumps.  That seems plausible, but I haven't looked closely.

Yeah, that's the main thing I'd worry about here.  For example,
ignoring some objects would likely lead to different conclusions about
the database objects' dependency web, possibly leading to changes in
dump order or other effects.  Maybe there's no problem in practice,
but this unsupported bug report doesn't really motivate me to do the
analysis to see if it'd be all right.

			regards, tom lane





view thread (20+ messages)  latest in thread

Message-ID: <1000041.1760471415@sss.pgh.pa.us>
Permalink:  ../1000041.1760471415@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1000041.1760471415@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19086: pg_dump --data-only selects and do not uses index definitions for the dumped tables.
  In-Reply-To: <1000041.1760471415@sss.pgh.pa.us>

* 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