diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2013-01-24 14:24:17 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2013-01-24 14:24:17 +0000 |
commit | b544ea1a4135bac7ececa3bc4eedfd457997d96e (patch) | |
tree | 3d5176c701e22283cef99688b8654042cd3dbd15 | |
parent | 3cef2179e0ded304286215c653d6458354d23a55 (diff) | |
download | postgresql-b544ea1a4135bac7ececa3bc4eedfd457997d96e.tar.gz postgresql-b544ea1a4135bac7ececa3bc4eedfd457997d96e.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index b61b603adb1..e05d9d3f229 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -171,7 +171,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)); |