aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-05-31 13:11:47 +0100
committerSimon Riggs <simon@2ndQuadrant.com>2012-05-31 13:11:47 +0100
commita2b516dab9b90007c1b65988d91222c4582adea8 (patch)
tree2ba23c50dc969f5531bec073ff05e5aedad98a10
parentc8105e62bbd7e873f6db5d79617ac66ef5169853 (diff)
downloadpostgresql-a2b516dab9b90007c1b65988d91222c4582adea8.tar.gz
postgresql-a2b516dab9b90007c1b65988d91222c4582adea8.zip
Only throw recovery conflicts when InHotStandby. Bug fix to recent
patch to allow Index Only Scans on Hot Standby. Bug report from Jaime Casanova
-rw-r--r--src/backend/access/heap/heapam.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 0c67156390a..ce52e2dd48e 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -4725,7 +4725,8 @@ heap_xlog_visible(XLogRecPtr lsn, XLogRecord *record)
* forces any index-only scan that is in flight to perform heap fetches,
* rather than killing the transaction outright.
*/
- ResolveRecoveryConflictWithSnapshot(xlrec->cutoff_xid, xlrec->node);
+ if (InHotStandby)
+ ResolveRecoveryConflictWithSnapshot(xlrec->cutoff_xid, xlrec->node);
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);