Re: partitioned indexes and tablespaces - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: partitioned indexes and tablespaces
Date
Msg-id 20181103205013.ptilinyb5u36fzmz@alvherre.pgsql
Whole thread Raw
In response to Re: partitioned indexes and tablespaces  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2018-Nov-03, Tom Lane wrote:

> Hmm ... in the April thread, one of the main concerns that prevented hasty
> action was fear of breaking dump/restore behavior.  Have you checked that
> with this change, a dump/restore will restore the same state (same
> actual tablespace assignments) that existed in the source DB?

I just did, and it does.  The tablespaces are changed with individual
"SET default_tablespace" lines whenever it changes between dumping two
indexes.

> How about if the parent partitioned index's tablespace assignment has
> been changed since a child index was made?

Each index is created independently, with the correct default
tablespace, and then they are all attached together to the parent index
using ALTER INDEX ATTTACH PARTITION.  The tablespace assignments are
identical to the source database.

> What happens with the --no-tablespaces option?

No "SET default_tablespace" lines are emitted in this case, so
everything ends up in the default tablespace, as expected.

> I think I'm okay with this change if the answers to all those questions
> are sane, but I didn't see them discussed in this thread.

I think they are.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: INSTALL file
Next
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: Installation instructions update (pg_ctl)