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

From Tom Lane
Subject Re: Avoiding Tablespace path collision for primary and standby
Date
Msg-id 4751.1527258832@sss.pgh.pa.us
Whole thread Raw
In response to Avoiding Tablespace path collision for primary and standby  (Ashwin Agrawal <aagrawal@pivotal.io>)
Responses Re: Avoiding Tablespace path collision for primary and standby  (Ashwin Agrawal <aagrawal@pivotal.io>)
List pgsql-hackers
Ashwin Agrawal <aagrawal@pivotal.io> writes:
> Proposing to create directory with timestamp at time of creating tablespace
> and create symbolic link to it instead.

I'm skeptical that this solves your problem.  What happens when the CREATE
TABLESPACE command is replicated to the standby with sub-second delay?
Clock skew is another reason to doubt that timestamp == unique identifier,
which is essentially what you're assuming here.

Even if we fixed that, the general idea of including a quasi-random
component in the directory name seems like it would have a lot of
unpleasant side effects in terms of reproduceability, testability, etc.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Enhancement Idea - Expose the active value of a parameter in pg_settings
Next
From: Tom Lane
Date:
Subject: Re: Unexpected casts while using date_trunc()