pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL won't start
2+ messages / 2 participants
[nested] [flat]

* PostgreSQL won't start
@ 2015-09-09 14:13 Laura Horsky <lhorsky@gwoslabs.com>
  2015-09-10 21:39 ` Re: PostgreSQL won't start Kevin Grittner <kgrittn@ymail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Laura Horsky @ 2015-09-09 14:13 UTC (permalink / raw)
  To: pgsql-admin

I have a PostgreSQL server that was restarted. When it was brought back
online, PostgreSQL fails to start with:

....LOG:  database system was interrupted; last known up at ....

....LOG:  unexpected pageaddr 2F/8D000000 in log file 47, segment 159,
offset 0

....LOG:  invalid primary checkpoint record

....LOG:  invalid secondary checkpoint record

....PANIC:  could not locate a valid checkpoint record

....LOG:  startup process (PID 20879) was terminated by signal 6: Aborted
....LOG:  aborting startup due to startup process failure

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

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.

Thanks.
Laura

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PostgreSQL won't start
  2015-09-09 14:13 PostgreSQL won't start Laura Horsky <lhorsky@gwoslabs.com>
@ 2015-09-10 21:39 ` Kevin Grittner <kgrittn@ymail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Kevin Grittner @ 2015-09-10 21:39 UTC (permalink / raw)
  To: Laura Horsky <lhorsky@gwoslabs.com>; 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


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-09-10 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09 14:13 PostgreSQL won't start Laura Horsky <lhorsky@gwoslabs.com>
2015-09-10 21:39 ` Kevin Grittner <kgrittn@ymail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox