Re: BUG #15343: Segmentation fault using pg_dump with --exclude-tableif table contains identity column

Поиск
Список
Период
Сортировка
Искать
От
David Rowley
Тема
Re: BUG #15343: Segmentation fault using pg_dump with --exclude-tableif table contains identity column
Дата
Msg-id
CAKJS1f_RzF8s5Osi2ae3fMMnBOv=zZSw51OJ1iPur=07d0Sw-w@mail.gmail.com
Ответ на
Список
Дерево обсуждения
BUG #15343: Segmentation fault using pg_dump with --exclude-table iftable contains identity column PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15343: Segmentation fault using pg_dump with --exclude-tableif table contains identity column David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15343: Segmentation fault using pg_dump with--exclude-table if table contains identity column Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #15343: Segmentation fault using pg_dump with--exclude-table if table contains identity column Michael Paquier <michael@paquier.xyz>
Re: BUG #15343: Segmentation fault using pg_dump with --exclude-tableif table contains identity column David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15343: Segmentation fault using pg_dump with--exclude-table if table contains identity column Michael Paquier <michael@paquier.xyz>
Re: BUG #15343: Segmentation fault using pg_dump with --exclude-tableif table contains identity column David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15343: Segmentation fault using pg_dump with --exclude-tableif table contains identity column Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: BUG #15343: Segmentation fault using pg_dump with--exclude-table if table contains identity column Michael Paquier <michael@paquier.xyz>
> To reproduce:
> $ createdb foo
> $ psql foo -c "create table bar(i int generated by default as identity
> primary key);"
> $ pg_dump foo --exclude-table=bar
> Segmentation fault (core dumped)

This crashes during dumpSequence() when the owning_tab's attnames are
accessed. This array is NULL since we didn't populate it in
getTableAttrs due to the table being !interesting.

I think the fix depends exactly on what we want the behaviour to be
here.  Should dumpSequence() still dump out a CREATE SEQUENCE
statement for this, or should we just ignore the sequence?  I imagine
we should just ignore identity sequences when we're not going to dump
the table that owns them. It looks like that would require a small
modification in getOwnedSeqs().  Otherwise we'd need something like
the attached to still dump out the CREATE SEQUENCE.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-bugs по дате отправления
От: PG Bug reporting form
Дата:
От: Alvaro Herrera
Дата:
FAQ