pgsql: Fix ALTER SEQUENCE OWNED BY to not rewrite the sequence relation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix ALTER SEQUENCE OWNED BY to not rewrite the sequence relation
Date: 2017-06-12 20:57:40
Message-ID: E1dKWP6-000544-1R@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix ALTER SEQUENCE OWNED BY to not rewrite the sequence relation.

It's not necessary for it to do that, since OWNED BY requires only ordinary
catalog updates and doesn't affect future sequence values. And pg_upgrade
needs to use OWNED BY without having it change the sequence's relfilenode.
Commit 3d79013b9 broke this by making all forms of ALTER SEQUENCE change
the relfilenode; that seems to be the explanation for the hard-to-reproduce
buildfarm failures we've been seeing since then.

Discussion: https://postgr.es/m/19785.1497215827@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a475e46634dc7abde1d5a6fc7aaa708219383004

Modified Files
--------------
src/backend/commands/sequence.c | 76 ++++++++++++++++++++++++++++-------------
1 file changed, 53 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2017-06-12 21:35:25 Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Previous Message Peter Eisentraut 2017-06-12 20:26:25 pgsql: doc: Update information_schema documentation for identity column