pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix potential SSI hazard in heap_update().
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix potential SSI hazard in heap_update().
@ 2021-04-13 01:04  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Thomas Munro @ 2021-04-13 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potential SSI hazard in heap_update().

Commit 6f38d4dac38 failed to heed a warning about the stability of the
value pointed to by "otid".  The caller is allowed to pass in a pointer to
newtup->t_self, which will be updated during the execution of the
function.  Instead, the SSI check should use the value we copy into
oldtup.t_self near the top of the function.

Not a live bug, because newtup->t_self doesn't really get updated until
a bit later, but it was confusing and broke the rule established by the
comment.

Back-patch to 13.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/2689164.1618160085%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b1df6b696b759f00ebbf02e6de64e259d4be5785

Modified Files
--------------
src/backend/access/heap/heapam.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix potential SSI hazard in heap_update().
@ 2021-04-13 01:05  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Thomas Munro @ 2021-04-13 01:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potential SSI hazard in heap_update().

Commit 6f38d4dac38 failed to heed a warning about the stability of the
value pointed to by "otid".  The caller is allowed to pass in a pointer to
newtup->t_self, which will be updated during the execution of the
function.  Instead, the SSI check should use the value we copy into
oldtup.t_self near the top of the function.

Not a live bug, because newtup->t_self doesn't really get updated until
a bit later, but it was confusing and broke the rule established by the
comment.

Back-patch to 13.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/2689164.1618160085%40sss.pgh.pa.us

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/16175e278763e88618c814b6489c4ae795501282

Modified Files
--------------
src/backend/access/heap/heapam.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-04-13 01:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 01:04 pgsql: Fix potential SSI hazard in heap_update(). Thomas Munro <tmunro@postgresql.org>
2021-04-13 01:05 pgsql: Fix potential SSI hazard in heap_update(). Thomas Munro <tmunro@postgresql.org>

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