pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix catalog insertion order for ATTACH PARTITION
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix catalog insertion order for ATTACH PARTITION
@ 2018-10-07 01:14  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-10-07 01:14 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1c7f585b5c1a317bdbdf7d41c7ffab9968738149

Modified Files
--------------
src/backend/commands/tablecmds.c          |  6 +++---
src/test/regress/expected/alter_table.out | 15 +++++++++++++++
src/test/regress/sql/alter_table.sql      | 16 ++++++++++++++++
3 files changed, 34 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix catalog insertion order for ATTACH PARTITION
@ 2018-10-07 01:14  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-10-07 01:14 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/39808e8868c8fac383b33aa103ab57539b0e2a69

Modified Files
--------------
src/backend/commands/tablecmds.c          |  6 +++---
src/test/regress/expected/alter_table.out | 15 +++++++++++++++
src/test/regress/sql/alter_table.sql      | 16 ++++++++++++++++
3 files changed, 34 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-10-07 01:14 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07 01:14 pgsql: Fix catalog insertion order for ATTACH PARTITION Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-10-07 01:14 pgsql: Fix catalog insertion order for ATTACH PARTITION Alvaro Herrera <alvherre@alvh.no-ip.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox