Re: [HACKERS] Finding corrupt data

Поиск
Список
Период
Сортировка
От Ed Loehr
Тема Re: [HACKERS] Finding corrupt data
Дата
Msg-id 38589D3E.40C8174@austin.rr.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Finding corrupt data  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Finding corrupt data  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Finding corrupt data  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> > 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...

One RDBMS I used had a utility called 'dbcheck' which did some sort of
examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
each examined object.  Such a utility for pgsql might simply do some
combination of SELECT * or COPY TO as you suggest above.

Would it be reasonable to put such a tool make its way onto the todo list, in
the absence of better alternatives?  I'd argue it's important for pgsql's
future popular prospects to be able to be _operated_  (i.e., live dbs backed
up, diagnosed as corrupted, and restored) by folks who may know very little
about the internals or the design of the schema/code.  Quick and correct
diagnosis of the problem is the key for them.  Such a tool would seem to go a
long way toward that end.

Cheers,
Ed Loehr



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVIN G