Re: tuples gone?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: tuples gone?
Дата
Msg-id 5203.1022162996@sss.pgh.pa.us
обсуждение исходный текст
Ответ на tuples gone?  (Daniel Kalchev <daniel@digsys.bg>)
Ответы Re: tuples gone?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Daniel Kalchev <daniel@digsys.bg> writes:
> VACUUM tells me:

> NOTICE:  Rel relx: TID 2344/5704: OID IS INVALID. TUPGONE 1.

It's physically impossible to get 2344 tuples on a page.  (If you're
using 8k pages then the most you could have per page is less than 200.)
So the above TID is obviously bogus, implying that you have pages
with corrupted page headers --- probably pd_lower is much larger than
it should be.

You could try dumping out the contents of page 5704, eg
dd bs=8k skip=5704 count=1 <tablefile | od -x

just to see what's there, but I bet you will find that it looks like
it's been trashed.

> Is there any way to recover this relation? Or at least as much data as 
> possible?

If you can figure out what pd_lower should be on each of the trashed
pages, you might be able to reset it to the correct value and recover
the tuples, if there are any un-trashed.  Otherwise zero out the trashed
page(s).  You should not expect to get everything back --- what you want
is to make the table readable so that you can dump the contents of the
undamaged pages.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Edge case problem with pg_dump
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: Redhat 7.3 time manipulation bug