summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Riggs2013-01-24 14:25:28 +0000
committerSimon Riggs2013-01-24 14:25:28 +0000
commit3a25b2d70c28942cf2c5e4d90d3a643baf845dfc (patch)
tree649ff85084404839d55c0f7a8650e92a5702d5a7
parent56d2975c3cae0bc795baf1d2e29e46875f5eaca5 (diff)
Fix rare missing cancellations in Hot Standby.
The machinery around XLOG_HEAP2_CLEANUP_INFO failed to correctly pass through the necessary information on latestRemovedXid, avoiding cancellations in some infrequent concurrent update/cleanup scenarios. Backpatchable fix to 9.0 Detailed bug report and fix by Noah Misch, backpatchable version by me.
-rw-r--r--src/backend/access/heap/pruneheap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index 6d72bb27659..cc3f8b90e1e 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -173,7 +173,7 @@ heap_page_prune(Relation relation, Buffer buffer, TransactionId OldestXmin,
* initialize the rest of our working state.
*/
prstate.new_prune_xid = InvalidTransactionId;
- prstate.latestRemovedXid = InvalidTransactionId;
+ prstate.latestRemovedXid = *latestRemovedXid;
prstate.nredirected = prstate.ndead = prstate.nunused = 0;
memset(prstate.marked, 0, sizeof(prstate.marked));