Re: pg_dump seg fault on sequences - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump seg fault on sequences
Date
Msg-id 392.1176652072@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump seg fault on sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump seg fault on sequences  ("Michael Nolan" <htfoot@gmail.com>)
Re: pg_dump seg fault on sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I wrote:
> "Michael Nolan" <htfoot@gmail.com> writes:
>> I've narrowed down the conditions under which pg_dump in 8.2.3 is creating a
>> segmentation fault.
>> It appears to happen only when dumping a sequence that is created for a
>> serial data element.

> Thanks for the test case --- I can reproduce this now on 8.2 and HEAD too.
> Will take a look tomorrow if no one beats me to it.

The failure occurs while trying to emit an ALTER SEQUENCE OWNED BY
command to link the sequence to its owning serial column.  If we chose
not to dump the parent table then we won't have collected enough
information about it to create this command (specifically, we never
fetched its column names).

The definitional question is: if we selected only the sequence to dump,
do we want that ALTER command to appear in the output or not?  It's a
reasonably straightforward fix either way (a bit easier for "not"),
but I'm unsure which is the most useful behavior.

            regards, tom lane

pgsql-general by date:

Previous
From: Angelo
Date:
Subject: Re: Dumping part (not all) of the data in a database...methods?
Next
From: "Michael Nolan"
Date:
Subject: Re: pg_dump seg fault on sequences