Possible SSI bug in heap_update
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2021-04-11T16:54:45Z
Lists: pgsql-hackers
While re-reading heap_update() in connection with that PANIC we're
chasing, my attention was drawn to this comment:
/*
* Note: beyond this point, use oldtup not otid to refer to old tuple.
* otid may very well point at newtup->t_self, which we will overwrite
* with the new tuple's location, so there's great risk of confusion if we
* use otid anymore.
*/
This seemingly sage advice is being ignored in one place:
CheckForSerializableConflictIn(relation, otid, BufferGetBlockNumber(buffer));
I wonder whether that's a mistake. There'd be only a low probability
of our detecting it through testing, I fear.
regards, tom lane
Commits
-
Fix potential SSI hazard in heap_update().
- 16175e278763 13.3 landed
- b1df6b696b75 14.0 landed