0001-Handling-HeapTupleInvisible-case.patch
application/octet-stream
Filename: 0001-Handling-HeapTupleInvisible-case.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch 0001
Subject: Handling HeapTupleInvisible case
| File | + | − |
|---|---|---|
| src/backend/executor/nodeModifyTable.c | 10 | 0 |
From c34faa5ad6af9ef4562feabd6bb4d361fe813945 Mon Sep 17 00:00:00 2001
From: kommih <haribabuk@fast.au.fujitsu.com>
Date: Mon, 29 Oct 2018 15:53:30 +1100
Subject: [PATCH] Handling HeapTupleInvisible case
In update/delete scenarios, when the tuple is
concurrently updated/deleted, sometimes locking
of a tuple may return HeapTupleInvisible. Handle
that case as nothing to do.
---
src/backend/executor/nodeModifyTable.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index 307c12ee69..b3851b180d 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -734,6 +734,11 @@ ldelete:;
goto ldelete;
}
+ else if (result == HeapTupleInvisible)
+ {
+ /* tuple is not visible; nothing to do */
+ return NULL;
+ }
}
switch (result)
@@ -1204,6 +1209,11 @@ lreplace:;
slot = ExecFilterJunk(resultRelInfo->ri_junkFilter, epqslot);
goto lreplace;
}
+ else if (result == HeapTupleInvisible)
+ {
+ /* tuple is not visible; nothing to do */
+ return NULL;
+ }
}
switch (result)
--
2.18.0.windows.1