]> granicus.if.org Git - postgresql/commit
Fix ALTER SEQUENCE OWNED BY to not rewrite the sequence relation.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Jun 2017 20:57:31 +0000 (16:57 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Jun 2017 20:57:31 +0000 (16:57 -0400)
commita475e46634dc7abde1d5a6fc7aaa708219383004
tree017bde4c30518af9096991ee024068c3cc82c356
parent5d8beac8bee344bdf4b05a63b93f06e05d999b39
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
src/backend/commands/sequence.c