Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group