Re: How to determine

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Gregery L(dot) Thompson *EXTERN*'" <gthompson(at)redflex(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to determine
Date: 2016-02-10 08:06:47
Message-ID: A737B7A37273E048B164557ADEF4A58B537F6FF2@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Gregery L. Thompson wrote:
> Had an error message on saying a datafile was missing:
>
> 1. How do you determine if you have a healthy postgres database?

pg_dumpall the cluster and see if you get errors.
That won't find all data corruption (e.g. a broken index),
but it is a good starting point.
Besides, if it succeeds, you have a backup in case the data corruption
eats your data.

> 2. If you have datafile corruption will the database come up.

Yes, in most cases.

> 3. It seems we have a datafile missing, how can you tell if you have datafile corruption.

See 1)
If you know the name of the missing datafile, you can query for
the "relfilenode" column of the "pg_class" table to find out which table
it belongs to.

> 4. What do you need to confirm before rebooting?

I do not understand this question.
If you have data corruption, a reboot will probably not help.

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Robert Verhoeve 2016-02-10 10:50:27 Downgrade 9.2.13.28 to 9.2.8
Previous Message Gregery L. Thompson 2016-02-09 23:46:24 How to determine