Re: BUG #15238: Sequence owner not updated when owning table isforeign

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: BUG #15238: Sequence owner not updated when owning table isforeign
Дата
Msg-id
e3cf9eb8-add9-f523-b3f8-de657e091a14@2ndquadrant.com
Ответ на
Список
Дерево обсуждения
BUG #15238: Sequence owner not updated when owning table is foreign PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Christoph Berg <christoph.berg@credativ.de>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Michael Paquier <michael@paquier.xyz>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Michael Paquier <michael@paquier.xyz>
Re: BUG #15238: Sequence owner not updated when owning table is foreign Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15238: Sequence owner not updated when owning table isforeign Michael Paquier <michael@paquier.xyz>
On 6/12/18 09:21, PG Bug reporting form wrote:
> If a foreign table has a sequence attached (e.g. if the foreign table has a
> "serial" column), and the foreign table owner is updated, the sequence owner
> is not updated, leading to errors on restore:

Yup, it only recurses to sequences for regular tables and materialized
views.  I suggest to remove the relkind check altogether.  See attached
patch.

Can materialized views even have serial columns?  I suspect materialized
views entered this conditional because of the toast table check nearby.

Also, can partitioned tables have serial columns?  Are there more omissions?

So fewer relkind enumerations are probably better.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-bugs по дате отправления
От: Andrew Gierth
Дата:
От: Alvaro Herrera
Дата:
FAQ