Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5c54f63

Browse files
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.
1 parent bd6aca8 commit 5c54f63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/access/heap/pruneheap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ heap_page_prune(Relation relation, Buffer buffer, TransactionId OldestXmin,
173173
* initialize the rest of our working state.
174174
*/
175175
prstate.new_prune_xid = InvalidTransactionId;
176-
prstate.latestRemovedXid = InvalidTransactionId;
176+
prstate.latestRemovedXid = *latestRemovedXid;
177177
prstate.nredirected = prstate.ndead = prstate.nunused = 0;
178178
memset(prstate.marked, 0, sizeof(prstate.marked));
179179

0 commit comments

Comments
 (0)