Re: PANIC: wrong buffer passed to visibilitymap_clear
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>, Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-04-09T23:32:03Z
Lists: pgsql-hackers
On 2021-04-09 16:27:39 -0700, Andres Freund wrote: > Just looking at the code in heap_update: I'm a bit confused about > RelationGetBufferForTuple()'s vmbuffer and vmbuffer_other > arguments. It looks like it's not at all clear which of the two > arguments will have the vmbuffer for which of the pages? > > if (otherBuffer == InvalidBuffer || targetBlock <= otherBlock) > GetVisibilityMapPins(relation, buffer, otherBuffer, > targetBlock, otherBlock, vmbuffer, > vmbuffer_other); > else > GetVisibilityMapPins(relation, otherBuffer, buffer, > otherBlock, targetBlock, vmbuffer_other, > vmbuffer); Oh, I missed that the arguments to GetVisibilityMapPins are appropriately swapped too. Greetings, Andres Freund
Commits
-
Avoid improbable PANIC during heap_update.
- 5f12bc94dcc6 12.7 landed
- 37e76546a2ba 13.3 landed
- 34f581c39e97 14.0 landed
-
Refactor lazy_scan_heap() loop.
- 7ab96cf6b312 14.0 cited