Re: check for missing tablespaces? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: check for missing tablespaces?
Date
Msg-id 12117.1243792748@sss.pgh.pa.us
Whole thread Raw
In response to Re: check for missing tablespaces?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: check for missing tablespaces?
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> ... and do what?

> In general, I think I'd probably prefer normal database startup to fail 
> if a tablespace is missing. That way I will know about it right then and 
> can remedy it. This is something that is much more likely to happen than 
> an arbitrary missing file, ISTM, and at the same time the check would be 
> much easier than looking for an arbitrary file. At the very least we 
> could issue a warning.

So what you're imagining is

* iterate through each symlink in $PGDATA/pg_tblspc
* check that PG_VERSION exists (and has the right contents??) in each pointed-to directory
* fail if not

I guess this is reasonable, since we make a similar check for the core
data directory itself.  Watch out for the initdb sequence though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: check for missing tablespaces?
Next
From: Andrew Dunstan
Date:
Subject: Re: check for missing tablespaces?