Ashwin Agrawal <aagrawal(at)pivotal(dot)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