aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2013-01-24 14:19:29 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2013-01-24 14:19:29 +0000
commit5c54f63fd66973c32f6e96333d3bee1ba3669563 (patch)
treec4cc0b4a49aaf7acbc274b421844959a8d03bd48 /src
parentbd6aca8a7713ecc0bed94dfb081bf24eda0c1f55 (diff)
downloadpostgresql-5c54f63fd66973c32f6e96333d3bee1ba3669563.tar.gz
postgresql-5c54f63fd66973c32f6e96333d3bee1ba3669563.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.
Diffstat (limited to 'src')
-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 3ca332d28f2..c723119ea80 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));