Re: check for missing tablespaces?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: check for missing tablespaces?
Date: 2009-05-31 17:59:08
Message-ID: 12117.1243792748@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-05-31 18:05:01 Re: check for missing tablespaces?
Previous Message Andrew Dunstan 2009-05-31 17:50:52 Re: check for missing tablespaces?