slot: also recompute pegged lsn on drop
authorAndres Freund <[email protected]>
Wed, 29 Jan 2014 17:01:09 +0000 (18:01 +0100)
committerAndres Freund <[email protected]>
Wed, 29 Jan 2014 17:01:09 +0000 (18:01 +0100)
src/backend/replication/slot.c

index 93a44f056003f824e3712c8b70ff5b2b6dd1636e..89c77e1714de04e97b2ec708e9a460b2df4c28f5 100644 (file)
@@ -457,8 +457,12 @@ ReplicationSlotDrop(const char *name)
        slot->in_use = false;
        LWLockRelease(ReplicationSlotControlLock);
 
-       /* slot is dead and doesn't nail the xmin anymore, recompute horizon */
+       /*
+        * Slot is dead and doesn't prevent resource removal anymore, recompute
+        * limits.
+        */
        ReplicationSlotsComputeRequiredXmin();
+       ReplicationSlotsComputeRequiredLSN();
 
        /*
         * If removing the directory fails, the worst thing that will happen is