Re: [HACKERS] Finding corrupt data

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Finding corrupt data
Дата
Msg-id 20394.945313767@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Finding corrupt data  (Matthew Hagerty <matthew@venux.net>)
Список pgsql-hackers
Matthew Hagerty <matthew@venux.net> writes:
> Is it possible that corrupt data could cause a backend crash?

Absolutely.  The scenario I've seen most is that the length word of a
variable-length field value (a "varlena" value in pghackers-speak)
contains garbage.  The backend comes along and tries to allocate space
equal to the claimed field length in order to copy the value to
someplace, and the usual result is that the backend process exceeds
its allowed memory usage and is summarily killed by the kernel.

> If there was corrupt data in a table, how would one go about finding it?

The brute-force way is to do a SELECT * or COPY TO and see if the
backend survives ;-).  If not, narrowing down which record is bad
is left as an exercise for the student...
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: [BUGS] uniqueness not always correct
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock