Re: ERROR: could not read block 4707 of relation 1663/16384/16564: Success

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: could not read block 4707 of relation 1663/16384/16564: Success
Дата
Msg-id 23420.1312209035@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ERROR: could not read block 4707 of relation 1663/16384/16564: Success  (Deniz Atak <denizatak@gmail.com>)
Список pgsql-general
Deniz Atak <denizatak@gmail.com> writes:
> thanks for your answer. Do you have any opinion about how can I find the
> corrupted rows? Do you know how to read:

> "could not read block 4707 of relation 1663/16384/16564"

You should read the chapter about Database Physical Storage in the
manual to find out how to interpret that as a reference to a specific
block of an operating system file.

In this case, since we believe the problem is a partial block at end of
file, the file size presumably is more than 4707*8K and less than
4708*8K.  If I had to recover from this I would physically truncate the
file to exactly 4707*8K bytes, after saving a copy of the remaining
bytes to see if there's anything useful in there.  (Most likely there's
not --- in particular, if this is the after-effects of an
out-of-disk-space condition that prevented Postgres from filling up a
whole new block, then I'd expect the partial page to be filled with
zeroes.)

On Unix machines you could use dd for that, though I'd strongly
recommend practicing on a scratch file as it's not exactly user
friendly.  Dunno what to use on Windows.

            regards, tom lane

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

Предыдущее
От: "Tomas Vondra"
Дата:
Сообщение: Re: ERROR: could not read block 4707 of relation 1663/16384/16564: Success
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Error: operator does not exist: integer = integer