Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3435693

Browse files
committed
Revert XactLockTableWait context setup in conditional multixact wait
There's no point in setting up a context error callback when doing conditional lock acquisition, because we never actually wait and so the able wouldn't be able to see it. Backpatch to 9.4, where this was added.
1 parent 0bfce76 commit 3435693

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/backend/access/heap/heapam.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ static void MultiXactIdWait(MultiXactId multi, MultiXactStatus status, uint16 in
109109
Relation rel, ItemPointer ctid, XLTW_Oper oper,
110110
int *remaining);
111111
static bool ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status,
112-
uint16 infomask, Relation rel, ItemPointer ctid,
113-
XLTW_Oper oper, int *remaining);
112+
uint16 infomask, Relation rel, int *remaining);
114113
static XLogRecPtr log_heap_new_cid(Relation relation, HeapTuple tup);
115114
static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_modified,
116115
bool *copy);
@@ -4431,8 +4430,7 @@ heap_lock_tuple(Relation relation, HeapTuple tuple,
44314430
{
44324431
if (!ConditionalMultiXactIdWait((MultiXactId) xwait,
44334432
status, infomask, relation,
4434-
&tuple->t_data->t_ctid,
4435-
XLTW_Lock, NULL))
4433+
NULL))
44364434
ereport(ERROR,
44374435
(errcode(ERRCODE_LOCK_NOT_AVAILABLE),
44384436
errmsg("could not obtain lock on row in relation \"%s\"",
@@ -6244,11 +6242,10 @@ MultiXactIdWait(MultiXactId multi, MultiXactStatus status, uint16 infomask,
62446242
*/
62456243
static bool
62466244
ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status,
6247-
uint16 infomask, Relation rel, ItemPointer ctid,
6248-
XLTW_Oper oper, int *remaining)
6245+
uint16 infomask, Relation rel, int *remaining)
62496246
{
62506247
return Do_MultiXactIdWait(multi, status, infomask, true,
6251-
rel, ctid, oper, remaining);
6248+
rel, NULL, XLTW_None, remaining);
62526249
}
62536250

62546251
/*

0 commit comments

Comments
 (0)