aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/logical.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-08-05 20:52:53 -0700
committerAndres Freund <andres@anarazel.de>2017-08-06 14:21:19 -0700
commit32d7480e02eef139265ece8c2b8842c0b3cb1127 (patch)
tree415377eccf495056b7130d93e67f11dd7e0510ea /src/backend/replication/logical/logical.c
parentf27449fcca947c5a7340a0e41d105584d6505adb (diff)
downloadpostgresql-32d7480e02eef139265ece8c2b8842c0b3cb1127.tar.gz
postgresql-32d7480e02eef139265ece8c2b8842c0b3cb1127.zip
Fix thinko introduced in 2bef06d516460 et al.
The callers for GetOldestSafeDecodingTransactionId() all inverted the argument for the argument introduced in 2bef06d516460. Luckily this appears to be inconsequential for the moment, as we wait for concurrent in-progress transaction when assembling a snapshot. Additionally this could only make a difference when adding a second logical slot, because only a pre-existing slot could cause an issue by lowering the returned xid dangerously much. Reported-By: Antonin Houska Discussion: https://postgr.es/m/32704.1496993134@localhost Backport: 9.4-, where 2bef06d516460 was backpatched to.
Diffstat (limited to 'src/backend/replication/logical/logical.c')
-rw-r--r--src/backend/replication/logical/logical.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c
index 3ea80253d36..f44533eb7f7 100644
--- a/src/backend/replication/logical/logical.c
+++ b/src/backend/replication/logical/logical.c
@@ -284,7 +284,7 @@ CreateInitDecodingContext(char *plugin,
*/
LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE);
- xmin_horizon = GetOldestSafeDecodingTransactionId(need_full_snapshot);
+ xmin_horizon = GetOldestSafeDecodingTransactionId(!need_full_snapshot);
slot->effective_catalog_xmin = xmin_horizon;
slot->data.catalog_xmin = xmin_horizon;