pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix catalog insertion order for ATTACH PARTITION
Date: Sun, 07 Oct 2018 01:14:04 +0000
Message-ID: <E1g8xe0-000098-No@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1g8xe0-000098-No@gemulon.postgresql.org>
Permalink:  ../E1g8xe0-000098-No@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g8xe0-000098-No@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Fix catalog insertion order for ATTACH PARTITION
  In-Reply-To: <E1g8xe0-000098-No@gemulon.postgresql.org>
  References: <E1g8xe0-000098-No@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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