1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Remove replication slot name check from ReplicationSlotAcquire()

When trying to access a replication slot that is supposed to already
exist, we don't need to check the naming rules again.  If the slot
does not exist, we will then get a "does not exist" error message, which
is generally more useful from the perspective of an end user.
This commit is contained in:
Peter Eisentraut
2017-05-30 14:57:01 -04:00
parent 9fcf670c2e
commit 420a0392ef

View File

@@ -331,8 +331,6 @@ ReplicationSlotAcquire(const char *name)
Assert(MyReplicationSlot == NULL);
ReplicationSlotValidateName(name, ERROR);
/* Search for the named slot and mark it active if we find it. */
LWLockAcquire(ReplicationSlotControlLock, LW_SHARED);
for (i = 0; i < max_replication_slots; i++)