Re: PostgreSQL won't start - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: PostgreSQL won't start
Date
Msg-id 591533476.500736.1441921198320.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to PostgreSQL won't start  (Laura Horsky <lhorsky@gwoslabs.com>)
List pgsql-admin
Laura Horsky <lhorsky@gwoslabs.com> wrote:

> I have a PostgreSQL server that was restarted. When it was
> brought back online,

That is pretty vague.  Exactly how was it restarted?  How was it
brought back online?  Was it really just that, or was this a
restore from backup or a copy on a new machine?

Exactly what version of PostgreSQL is this?

> PostgreSQL fails to start with:
>
> ....LOG:  database system was interrupted; last known up at ....

You didn't get a clean shutdown of the database server, so
something was done that was not optimal.  We can't give very
detailed advice without knowing what.  By the way, seeing
timestamps for the startup and the "last known up at" times would
provide at least some clue what might have happened.

> I have pg_dumps that were taken prior to failure that I can
> restore to if I can get PostgreSQL running again.

That's good.  If you wrangle what you have into starting you should
hang onto those dumps for a while (maybe a few months) after you
are running again.  You may need to fish some data out of them if
you later see corruption or missing data.

> How can I fix PostgreSQL? I have seen pg_resetxlog but there are
> so many warnings, I want to make sure that this is the tool to
> use.

First thing is to make a filesystem-level copy of the $PGDATA
directory tree, in case your recovery attempts make things worse.
pg_resetxlog may well allow the database to start, but you should
heed the warnings about pg_dump and restore of the result to
eliminate hidden corruption, and review after that to look for
damaged or missing data.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-admin by date:

Previous
From: John Scalia
Date:
Subject: Re: Cannot get extensions to load
Next
From: Craig James
Date:
Subject: Re: Cannot get extensions to load