Re: pg_dump crash on identity sequence with not loaded attributes

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Artur Zakirov <zaartur@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2024-12-10T18:08:09Z
Lists: pgsql-bugs
Artur Zakirov <zaartur@gmail.com> writes:
> Alternatively, instead of forcing owning_tab->interesting to true, I
> think we could always initialize owning_tab's attributes (i.e. arrays
> like owning_tab->attnames, owning_tab->attidenity), which are used by
> dumpSequence() and which causes the crash. Are there any downsides of
> it?

Lots.  The entire point of the ->interesting flag is to avoid fetching
additional details about tables that we don't really care about.
Unless I misunderstand, you're proposing throwing away that whole
optimization, which has got to be an overall loss.

			regards, tom lane



Commits

  1. Fix possible crash in pg_dump with identity sequences.

  2. Do not dump identity sequences with excluded parent table