| От | Tom Lane |
|---|---|
| Тема | Re: How can I find a broken row in a table |
| Дата | |
| Msg-id | 8600.1271427828@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | How can I find a broken row in a table (Khangelani Gama <Khangelani.Gama@ucs-software.co.za>) |
| Список | pgsql-admin |
Khangelani Gama <Khangelani.Gama@ucs-software.co.za> writes:
> Please help me, I am using PostgreSQL 7.3.4 running on Redhat5
> there is a table that has a broken row, but now I don't know which one
is broken. the table has about 20974 pages. is there a command to find
this?
You have to use divide-and-conquer. Try
select ctid from table limit N;
and vary N until you find the largest value that *doesn't* produce an
error. The block number in the last ctid from that query is the block
before the bad one, or possibly a small number of blocks before the bad
one if there are some totally-empty blocks.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера