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

Commitaa4b8c6

Browse files
committed
Handle table_complete_speculative's succeeded argument as documented.
For some reason both callsite and the implementation for heapam hadthe meaning inverted (i.e. succeeded == true was passed in case ofconflict). That's confusing.I (Andres) briefly pondered whether it'd be better to renametable_complete_speculative's argument to 'bool specConflict' or such,but decided not to. The 'complete' in the function name for me makes`succeeded` sound a bit better.Reported-By: Ashwin Agrawal, Melanie Plageman, Heikki LinnakangasDiscussion:https://postgr.es/m/CALfoeitk7-TACwYv3hCw45FNPjkA86RfXg4iQ5kAOPhR+F1Y4w@mail.gmail.comhttps://postgr.es/m/97673451-339f-b21e-a781-998d06b1067c@iki.fi
1 parent08e2edc commitaa4b8c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ heapam_tuple_complete_speculative(Relation relation, TupleTableSlot *slot,
282282
HeapTupletuple=ExecFetchSlotHeapTuple(slot, true,&shouldFree);
283283

284284
/* adjust the tuple's state accordingly */
285-
if (!succeeded)
285+
if (succeeded)
286286
heap_finish_speculative(relation,&slot->tts_tid);
287287
else
288288
heap_abort_speculative(relation,&slot->tts_tid);

‎src/backend/executor/nodeModifyTable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ ExecInsert(ModifyTableState *mtstate,
556556

557557
/* adjust the tuple's state accordingly */
558558
table_complete_speculative(resultRelationDesc,slot,
559-
specToken,specConflict);
559+
specToken,!specConflict);
560560

561561
/*
562562
* Wake up anyone waiting for our decision. They will re-check

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp