Re: corrupted item pointer:???

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: corrupted item pointer:???
Дата
Msg-id 9618.1145029229@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: corrupted item pointer:???  ("hubert depesz lubaczewski" <depesz@gmail.com>)
Ответы Re: corrupted item pointer:???  ("hubert depesz lubaczewski" <depesz@gmail.com>)
Список pgsql-general
"hubert depesz lubaczewski" <depesz@gmail.com> writes:
> i made pg_filedump _FILE_ > ~/_FILE_.dump
> it went fine
> grep -i error ~/*.dump also didn't show anything.

Oh, that's interesting.  Looking more closely, the test in
PageRepairFragmentation()

                if (itemidptr->itemoff < (int) pd_upper ||
                    itemidptr->itemoff >= (int) pd_special)
                    ereport(ERROR,
                            (errcode(ERRCODE_DATA_CORRUPTED),
                             errmsg("corrupted item pointer: %u",
                                    itemidptr->itemoff)));

is slightly tighter than what pg_filedump does:

      // Make sure the item can physically fit on this block before
      // formatting
      if ((itemOffset + itemSize > blockSize) ||
          (itemOffset + itemSize > bytesToFormat))
        printf ("  Error: Item contents extend beyond block.\n"
            "         BlockSize<%d> Bytes Read<%d> Item Start<%d>.\n",
            blockSize, bytesToFormat, itemOffset + itemSize);

I'm guessing that the lack of a check for itemOffset < pd_upper is why
pg_filedump is failing to notice anything wrong.  Do you want to add one
and try again?

            regards, tom lane

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

Предыдущее
От: "Tomi NA"
Дата:
Сообщение: Re: ilike and utf-8
Следующее
От: Tom Lane
Дата:
Сообщение: Re: what the problem with this query