Re: Data corruption zero a file - help!!

Поиск
Список
Период
Сортировка
От Noel Faux
Тема Re: Data corruption zero a file - help!!
Дата
Msg-id 4410BBEE.3050800@med.monash.edu.au
обсуждение исходный текст
Ответ на Re: Data corruption zero a file - help!!  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: Data corruption zero a file - help!!
Список pgsql-general
To clarify, when set on, every time it hits this error, postgres will rezero that block?

Michael Fuhr wrote:
On Thu, Mar 09, 2006 at 03:57:46PM +1100, Noel Faux wrote: 
Given that this seems problem has occurred a number of times for a 
number I've written a small step by step procedure to address this 
issue.  Is there any other comments you which to add.  I was thinking 
that this should be added to the FAQ / troubleshooting in the docs.

How to repair corrupted data due to "ERROR: invalid page header in block 
X of relation "Y":   
In pgsql-novice Christopher Goodfellow mentioned the zero_damaged_pages
option that I had forgotten about.  If you don't care about examining
the bad pages then you could set this option in a session and execute
a statement that hits every page in the file (Tom Lane mentioned
VACUUM and SELECT COUNT(*)).  Here's the example I posted in reply:

test=# select count(*) from foo;
ERROR:  invalid page header in block 10 of relation "foo"
test=# set zero_damaged_pages to on;
SET
test=# select count(*) from foo;
WARNING:  invalid page header in block 10 of relation "foo"; zeroing out page
WARNING:  invalid page header in block 20 of relation "foo"; zeroing out page
WARNING:  invalid page header in block 30 of relation "foo"; zeroing out pagecount 
------- 9445
(1 row)

test=# set zero_damaged_pages to off;
SET
 

Вложения

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

Предыдущее
От: Rick Ellis
Дата:
Сообщение: Re: majordomo unmaintained, postmaster emails ignored?
Следующее
От: "Nik"
Дата:
Сообщение: Re: Out of memory error on pg_restore