Re: PANIC: wrong buffer passed to visibilitymap_clear
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-11T17:41:32Z
Lists: pgsql-hackers
I wrote: > (It does look like RelationGetBufferForTuple > knows about updating vmbuffer, but there's one code path through the > if-nest at 3850ff that doesn't call that.) Although ... isn't RelationGetBufferForTuple dropping the ball on this point too, in the code path at the end where it has to extend the relation? I'm now inclined to think that we should toss every single line of that code, take RelationGetBufferForTuple out of the equation, and have just *one* place that rechecks for PageAllVisible having just become set. It's a rare enough case that optimizing it is completely not worth the code complexity and risk (er, reality) of hard-to-locate bugs. regards, tom lane
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