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 tablespace handling for partitioned indexes
Date: Sat, 03 Nov 2018 16:33:29 +0000
Message-ID: <E1gIyrZ-0003Tg-JN@gemulon.postgresql.org> (raw)

Fix tablespace handling for partitioned indexes

When creating partitioned indexes, the tablespace was not being saved
for the parent index. This meant that subsequently created partitions
would not use the right tablespace for their indexes.

ALTER INDEX SET TABLESPACE and ALTER INDEX ALL IN TABLESPACE raised
errors when tried; fix them too.  This requires bespoke code for
ATExecCmd() that applies to the special case when the tablespace move is
just a catalog change.

Discussion: https://postgr.es/m/20181102003138.uxpaca6qfxzskepi@alvherre.pgsql

Branch
------
master

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

Modified Files
--------------
src/backend/catalog/heap.c                | 10 +++++-
src/backend/commands/tablecmds.c          | 60 +++++++++++++++++++++++++++++--
src/test/regress/input/tablespace.source  | 10 ++++++
src/test/regress/output/tablespace.source | 19 +++++++++-
4 files changed, 94 insertions(+), 5 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1gIyrZ-0003Tg-JN@gemulon.postgresql.org>
Permalink:  ../E1gIyrZ-0003Tg-JN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gIyrZ-0003Tg-JN@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 tablespace handling for partitioned indexes
  In-Reply-To: <E1gIyrZ-0003Tg-JN@gemulon.postgresql.org>
  References: <E1gIyrZ-0003Tg-JN@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