pgsql: Recurse to sequences on ownership change for all relkinds

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Recurse to sequences on ownership change for all relkinds
Date: 2018-09-26 18:53:13
Message-ID: E1g5Evx-0007dW-Lp@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Recurse to sequences on ownership change for all relkinds

When a table ownership is changed, we must apply that also to any owned
sequences. (Otherwise, it would result in a situation that cannot be
restored, because linked sequences must have the same owner as the
table.) But this was previously only applied to regular tables and
materialized views. But it should also apply to at least foreign
tables. This patch removes the relkind check altogether, because it
doesn't save very much and just introduces the possibility of similar
omissions.

Bug: #15238
Reported-by: Christoph Berg <christoph(dot)berg(at)credativ(dot)de>

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/14ce78e478b1708bc146685ea1870cc18d6181a4

Modified Files
--------------
src/backend/commands/tablecmds.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-09-26 19:35:25 Re: pgsql: Remove absolete function TupleDescGetSlot().
Previous Message Peter Eisentraut 2018-09-26 18:04:39 Re: pgsql: Incorporate strerror_r() into src/port/snprintf.c, too.