Re: PANIC: heap_update_redo: no block

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: PANIC: heap_update_redo: no block
Дата
Msg-id dvohju$gaf$1@news.hub.org
обсуждение исходный текст
Ответ на PANIC: heap_update_redo: no block  ("Alex bahdushka" <bahdushka@gmail.com>)
Ответы Re: PANIC: heap_update_redo: no block  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
""Alex bahdushka"" <bahdushka@gmail.com> wrote
>
> Hrm... well i obviously have restored the database by now (using
> pg_resetxlog; pg_dump; initdb; pg_restore).  However i did make a
> backup of the broken directory before I created the new database.  If
> anyone has any thing they would like me to try to possibly help track
> down this possible bug.  I would be more than glad to do it.
>

pg_resetxlog is the last resort to "avoid" the real problem. Once you reset
it, then the xlog after that some offset will not get replayed (so the
problem disappered) and possibly some data get lost :-(.

Can you patch the heap/heapam.c/heap_xlog_update() like this:

- elog(PANIC, "heap_update_redo: no block");
+ elog(PANIC, "heap_update_redo: no block: target block: %u, relation
length: %u",
+    ItemPointerGetBlockNumber(&(xlrec->target.tid)),
+    RelationGetNumberOfBlocks(reln));

And restart your database to see what's the output?

Regards,
Qingqing



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

Предыдущее
От: "Murali K. Maddali"
Дата:
Сообщение: Re: xml output.
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: What's a good default encoding?