Re: check for missing tablespaces?

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

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>> I am in the middle of helping a customer recover from a situation where
>> a tablespace was missing when a machine was rebooted and postgres
>> restarted, and I'm wondering if we should not have some sort of check
>> for this on startup. Maybe we could check for the existence of the
>> PG_VERSION file or something like that?
>>
>
> ... and do what?
>
> What exactly went wrong so badly with the missing tablespace? Doesn't
> seem like it should be any worse than if individual table files went
> missing.
>
>
>

Well, in the present instance probably nothing drastic went wrong. The
tablespace only contained indexes - if an index is missing then updates
to the base table will fail, right?

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.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-05-31 17:59:08 Re: check for missing tablespaces?
Previous Message Tom Lane 2009-05-31 17:28:01 Re: check for missing tablespaces?