Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toastvalue 76753264 in pg_toast_10920100
От | Harry Ambrose |
---|---|
Тема | Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toastvalue 76753264 in pg_toast_10920100 |
Дата | |
Msg-id | CAK4Knu_dxydaskUtvaH0Nk65psjYH3SnCretJf7TN0owAG-z5Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100 (ADSJ (Adam Sjøgren) <adsj@novozymes.com>) |
Список | pgsql-general |
int hasfailed;
hasfailed = 0;
(...)
while ((ttup = systable_getnext_ordered(toastscan, ForwardScanDirection)) != NULL)
{
/*
* Have a chunk, extract the sequence number and the data
*/
residx = DatumGetInt32(fastgetattr(ttup, 2, toasttupDesc, &isnull));
Assert(!isnull);
chunk = DatumGetPointer(fastgetattr(ttup, 3, toasttupDesc, &isnull));
Assert(!isnull);
(...)
/*
* Some checks on the data we've found
*/
if (residx != nextidx)
{
/*
* Remove error status and convert to DEBUG5. Its important to see what other values are returned. We should error outside the loop.
elog(ERROR, "unexpected chunk number %d (expected %d) for toast value %u in %s",
residx, nextidx,
toast_pointer.va_valueid,
RelationGetRelationName(toastrel));
*/
elog(DEBUG5, "unexpected chunk number %d (expected %d) for toast value %u in %s",
residx, nextidx,
toast_pointer.va_valueid,
RelationGetRelationName(toastrel));
hasfailed = 1;
}
(...)
/*
* Log the current chunk number and the expected chunk number
*/
if (hasfailed!=0)
{
elog(DEBUG5, "HARRYAMBROSE - Current chunk number is %d, expecting %d.", residx, nextidx);
}
nextidx++;
} // End while loop
elog(DEBUG5, "HARRYAMBROSE - Has failed is %d after loop", hasfailed);
if (hasfailed!=0)
{
elog(ERROR, "unexpected chunk number exception, please see DEBUG.");
}
Happy to provide further info if required. I have tried to pick only the interesting changes above ^.
Thanks again for your help!
Have a great weekend :)
Harry
В списке pgsql-general по дате отправления:
Предыдущее
От: Арсен АрутюнянДата:
Сообщение: [GENERAL] BUG in Prepared transactions from C code using JSON
Следующее
От: "Daniel Verite"Дата:
Сообщение: Re: [GENERAL] Suddenly - LOG: could not open file "postmaster.pid": No such file or directory