Re: Avoiding Tablespace path collision for primary and standby

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ashwin Agrawal <aagrawal(at)pivotal(dot)io>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Avoiding Tablespace path collision for primary and standby
Date: 2018-05-25 14:33:52
Message-ID: 4751.1527258832@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-25 14:41:55 Re: Unexpected casts while using date_trunc()
Previous Message Robert Haas 2018-05-25 14:32:59 Re: Enhancement Idea - Expose the active value of a parameter in pg_settings