Mats Lofkvist <mal@algonet.se> writes:
> PANIC: moving chain: failed to add item with len = 93 to page 9395
Thanks for the report. I see a likely cause of this, which seems to
have been there for awhile:
to_vacpage->free -= MAXALIGN(tlen);
if (to_vacpage->offsets_used >= to_vacpage->offsets_free)
to_vacpage->free -= MAXALIGN(sizeof(ItemIdData));
The second MAXALIGN() shouldn't be there. Because it is,
to_vacpage->free is decremented too much, possibly causing it to wrap
around and look large and positive, possibly allowing the code to try
to move more stuff onto the page than will fit.
> When rerunning the vacuum on the table it failed on, it seems to work:
Yeah, it would; after a system restart there'd be no tuple-chain-moving
activity because no other open transactions, so the buggy code wouldn't
get executed.
> I'm running it on a sparc/solaris box. There is no core dump.
There wouldn't be that, either; elog(PANIC) doesn't induce a core dump.
Maybe it should.
regards, tom lane