pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: Possible SSI bug in heap_update
Date: Sun, 11 Apr 2021 12:54:45 -0400
Message-ID: <2689164.1618160085@sss.pgh.pa.us> (raw)

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





view thread (3+ messages)  latest in thread

Message-ID: <2689164.1618160085@sss.pgh.pa.us>
Permalink:  ../2689164.1618160085@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2689164.1618160085@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: Possible SSI bug in heap_update
  In-Reply-To: <2689164.1618160085@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox