Re: Tablespaces in the data directory

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Tablespaces in the data directory
Date: 2012-12-05 01:04:42
Message-ID: 20121205010442.GA16472@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 03, 2012 at 01:14:30PM -0500, Andrew Dunstan wrote:
> I think it would be reasonable for it to complain if it came across a
> PG_VERSION file in an unexpected location.

That sounds like a reliable approach to detecting the hazard. Pseudocode:

chdir(proposed_tablespace_path)
do {
if (stat("PG_VERSION"))
ereport(WARNING, ...)
} while (chdir(".."))

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-12-05 01:10:07 Re: PITR potentially broken in 9.2
Previous Message Tom Lane 2012-12-05 00:35:48 Re: PITR potentially broken in 9.2