Re: Avoiding Tablespace path collision for primary and standby - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Avoiding Tablespace path collision for primary and standby
Date
Msg-id 20180526034804.GA8180@paquier.xyz
Whole thread Raw
In response to Re: Avoiding Tablespace path collision for primary and standby  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On Sat, May 26, 2018 at 02:10:52PM +1200, Thomas Munro wrote:
> I also wondered about this when trying to figure out how to write a
> TAP test for recovery testing with tablespaces, for my undo proposal.
> I was starting to wonder about either allowing relative paths or
> supporting some kind of variable in the tablespace path that could
> then be set differently in each cluster's .conf.

As for now for tablespace creation with multiple nodes on the same host,
you really come to just using the tablespace map within pg_basebackup..
I think that this is a difficult problem as one may want to not use the
same partition space for both primary and standby, hence you would need
to associate a tablespace path with one node using for example a node
name set in postgresql.conf, while extending CREATE TABLESPACE to
support this grammar and register the paths for each nodes in WAL
records.  Using a path that variates depending on the time is not a good
idea in my opinion.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Avoiding Tablespace path collision for primary and standby
Next
From: Piotr Stefaniak
Date:
Subject: Re: jsonb iterator not fully initialized