Re: [GSOC] - I ntegrity check algorithm for data files

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [GSOC] - I ntegrity check algorithm for data files
Дата
Msg-id 20070518112923.GA29115@svana.org
обсуждение исходный текст
Ответ на [GSOC] - I ntegrity check algorithm for data files  (Robert Mach <mach.robert@gmail.com>)
Список pgsql-hackers
On Fri, May 18, 2007 at 12:52:20PM +0200, Robert Mach wrote:
> Before presenting possible errors, I divided them into physical and
> logical errors. Physical errors will refer to errors in the structure of
> pages and tuples, whereas logical errors will depict errors that cause
> incorrect performance of postgresql, but are correct according the
> structure of data files.

Have you looked at pgfsck? I think you also need to check much lower
level stuff also. Let:
- Page headers
- Are all the item pointers in order an non-overlapping
- Is each item correctly structured, do the XIDs look OK. What about
the HINT bits. Can the tuple be decoded properly. One common problem
with data corruption is that postgres with see a varlen header which
says the daa is 2K (or 2M) whereas the item is only 50bytes long, so
that's obviously broken.

Only once you're sure about the actual structure can you worry about
thing like toast pointer (which are important, but less likely to crash
postgres).

All this applies to index pages also.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: Working with PostgreSQL source tree (was Re: Not ready for 8.3)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Reducing stats collection overhead