Re: postgres crash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: postgres crash
Дата
Msg-id 20933.1312396065@sss.pgh.pa.us
обсуждение исходный текст
Ответ на postgres crash  (mattfairley@netscape.net)
Ответы Re: postgres crash  (Matthew Fairley <mattfairley@netscape.net>)
Список pgsql-novice
mattfairley@netscape.net writes:
> I am a complete newb with postgres. In fact, I don't even use it as
> such but have a problem with a crashed postgresql db associated with
> using Calendar Server on Mac OS X 10.6 on a Mac Mini. To cut a long
> story short, I had to reformat my hard drive and restore form a Time
> Machine backup.

Yeah, that's not exactly the approved way to back up a Postgres
instance; you're likely to get a collection of files that are somewhat
out-of-sync with each other, which seems to be exactly what this is
about:

> LOG:  database system was interrupted; last known up at 2011-07-15 07:48:24 BST
> LOG:  unexpected pageaddr 0/2058000 in log file 0, segment 4, offset 360448
> LOG:  invalid primary checkpoint record
> LOG:  unexpected pageaddr 0/2056000 in log file 0, segment 4, offset 352256
> LOG:  invalid secondary checkpoint record
> PANIC:  could not locate a valid checkpoint record

> I've tried using pg_resetxlog with the -f switch but I don't really know what I'm doing.

pg_resetxlog is pretty much the only way out, given that you don't have
any other form of backup.  But you haven't shown us exactly what you did
or exactly how it failed.

The man page for pg_resetxlog is reasonably thorough, did you read it?
http://www.postgresql.org/docs/9.0/static/app-pgresetxlog.html

(Once you do get it to start again, you'll at minimum want to do a
complete database reindex, and ideally a dump/re-initdb/reload, to try
to make sure there's not lingering database corruption.)

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: mattfairley@netscape.net
Дата:
Сообщение: postgres crash
Следующее
От: Matthew Fairley
Дата:
Сообщение: Re: postgres crash