diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-08-25 15:33:19 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-08-25 15:33:19 -0400 |
commit | 34356933f044d5e3fa02a30ef1fe859eca20d605 (patch) | |
tree | 2608411971dd3a0013b63d0768d1f90ea2887dcb | |
parent | 0bfce7618420c6f1eece55577c61ef2a7a12f80b (diff) | |
download | postgresql-34356933f044d5e3fa02a30ef1fe859eca20d605.tar.gz postgresql-34356933f044d5e3fa02a30ef1fe859eca20d605.zip |
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.
-rw-r--r-- | src/backend/access/heap/heapam.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index f710cdc3645..fa608cf8fd3 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -109,8 +109,7 @@ static void MultiXactIdWait(MultiXactId multi, MultiXactStatus status, uint16 in Relation rel, ItemPointer ctid, XLTW_Oper oper, int *remaining); static bool ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status, - uint16 infomask, Relation rel, ItemPointer ctid, - XLTW_Oper oper, int *remaining); + uint16 infomask, Relation rel, int *remaining); static XLogRecPtr log_heap_new_cid(Relation relation, HeapTuple tup); static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_modified, bool *copy); @@ -4431,8 +4430,7 @@ l3: { if (!ConditionalMultiXactIdWait((MultiXactId) xwait, status, infomask, relation, - &tuple->t_data->t_ctid, - XLTW_Lock, NULL)) + NULL)) ereport(ERROR, (errcode(ERRCODE_LOCK_NOT_AVAILABLE), errmsg("could not obtain lock on row in relation \"%s\"", @@ -6244,11 +6242,10 @@ MultiXactIdWait(MultiXactId multi, MultiXactStatus status, uint16 infomask, */ static bool ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status, - uint16 infomask, Relation rel, ItemPointer ctid, - XLTW_Oper oper, int *remaining) + uint16 infomask, Relation rel, int *remaining) { return Do_MultiXactIdWait(multi, status, infomask, true, - rel, ctid, oper, remaining); + rel, NULL, XLTW_None, remaining); } /* |