]> granicus.if.org Git - postgresql/commit
Fix catalog insertion order for ATTACH PARTITION
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 7 Oct 2018 01:13:19 +0000 (22:13 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 7 Oct 2018 01:13:19 +0000 (22:13 -0300)
commit1c7f585b5c1a317bdbdf7d41c7ffab9968738149
tree6ad910ec926edde3bf4cad3a9a01ffedc83afa48
parent1a852f7c1e27eef563cf0577c2604baec1be5512
Fix catalog insertion order for ATTACH PARTITION

Commit 2fbdf1b38bc changed the order in which we inserted catalog rows
when creating partitions, so that we could remove an unsightly hack
required for untimely relcache invalidations.  However, that commit only
changed the ordering for CREATE TABLE PARTITION OF, and left ALTER TABLE
ATTACH PARTITION unchanged, so the latter can be affected when catalog
invalidations occur, for instance when the partition key involves an SQL
function.

Reported-by: Rajkumar Raghuwanshi
Author: Amit Langote
Reviewed-by: Michaƫl Paquier
Discussion: https://postgr.es/m/CAKcux6=nTz9KSfTr_6Z2mpzLJ_09JN-rK6=dWic6gGyTSWueyQ@mail.gmail.com
src/backend/commands/tablecmds.c
src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql