Possible SSI bug in heap_update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Possible SSI bug in heap_update
Date: 2021-04-11 16:54:45
Message-ID: 2689164.1618160085@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2021-04-11 16:55:08 Re: PL/R regression on windows, but not linux with master.
Previous Message Dave Cramer 2021-04-11 16:51:27 Re: PL/R regression on windows, but not linux with master.