pg_dump segfaults with publication

Started by Amit Langoteabout 9 years ago2 messageshackers
Jump to latest
#1Amit Langote
Langote_Amit_f8@lab.ntt.co.jp

Hi,

pg_dump segfaults if there are more than one DO_PUBLICATION_REL objects to
dump.

create table foo (a int);
create publication foo_pub;
alter publication foo_pub add table foo;

$ pg_dump
<OK>

create table bar (a int);
alter publication foo_pub add table bar;

$ pg_dump -s
Segmentation fault (core dumped)

The reason is DumpableObject.name is not set being set in
getPublicationTables(). Attached patch fixes that.

Thanks,
Amit

Attachments:

0001-Set-DumpableObject.name-for-PublicationRelInfo-objec.patchtext/x-diff; name=0001-Set-DumpableObject.name-for-PublicationRelInfo-objec.patchDownload+1-1
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Amit Langote (#1)
Re: pg_dump segfaults with publication

On 3/6/17 03:06, Amit Langote wrote:

pg_dump segfaults if there are more than one DO_PUBLICATION_REL objects to
dump.

Fix committed with a test case. Thanks.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers