Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb1df6b6

Browse files
committed
Fix potential SSI hazard in heap_update().
Commit6f38d4d failed to heed a warning about the stability of thevalue pointed to by "otid". The caller is allowed to pass in a pointer tonewtup->t_self, which will be updated during the execution of thefunction. Instead, the SSI check should use the value we copy intooldtup.t_self near the top of the function.Not a live bug, because newtup->t_self doesn't really get updated untila bit later, but it was confusing and broke the rule established by thecomment.Back-patch to 13.Reported-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/2689164.1618160085%40sss.pgh.pa.us
1 parent885a876 commitb1df6b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3900,7 +3900,8 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
39003900
* will include checking the relation level, there is no benefit to a
39013901
* separate check for the new tuple.
39023902
*/
3903-
CheckForSerializableConflictIn(relation,otid,BufferGetBlockNumber(buffer));
3903+
CheckForSerializableConflictIn(relation,&oldtup.t_self,
3904+
BufferGetBlockNumber(buffer));
39043905

39053906
/*
39063907
* At this point newbuf and buffer are both pinned and locked, and newbuf

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp