Re: postmaster fails to start

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: postmaster fails to start
Дата
Msg-id 42943C5C.2040009@archonet.com
обсуждение исходный текст
Ответ на postmaster fails to start  ("Dweck Nir" <Nir.Dweck@tadirantele.com>)
Список pgsql-general
I've taken the liberty of rearranging your email slightly.

Dweck Nir wrote:
> The sequence of events was as follow: 1) computer was shut down
> without stopping postmaster.

OK - not good. Some crucial questions:
1. Do you have fsync enabled or disabled in the postgresql.conf file?
2. Do you know whether your drives are flushing write-cache properly?

> 2) postmaster was started, but because of an error that there might
> be another postmaster running, the postmaster was started again.

Was this just a matter of deleting the .pid file and did you check there
wasn't another postmaster running?

> 3) since then each time I try to start the postmaster I get the same
> error.


 > LOG:  redo starts at 1/A500075C PANIC:  btree_delete_page_redo: lost
 > target page LOG:  startup process (PID 4409) was terminated by signal
 > 6

OK - well, this error message is in backend/access/nbtree/nbtxlog.c
where it is replaying the write-ahead-log files for btrees (I'm no
hacker, I just searched the source for the error message and read the
comments).

So - it looks like you might have a corrupted WAL. That shouldn't be
possible if you were running with fsync enabled and drives that flushed
cache like they should, so I'm guessing that wasn't the case.

It might be possible to recover to a state before this point, but that's
not something I'm going to be able to advise on. There are two steps you
should take immediately though.

1. Take a file-backup of your entire data directory and keep it safe.
You might well be making repeated attempts to recover this.
2. Check your most recent database backup and restore it to another
machine - it may be quicker to restore that than fix your file corruption.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Update on tables when the row doesn't change
Следующее
От: CSN
Дата:
Сообщение: More detailed error logging?