]> granicus.if.org Git - postgresql/commitdiff
Remove replication slot name check from ReplicationSlotAcquire()
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 30 May 2017 18:57:01 +0000 (14:57 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 2 Jun 2017 19:16:57 +0000 (15:16 -0400)
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.

src/backend/replication/slot.c

index 5386e86aa6b3b6d9afd1bd5ad92d979736a09c12..c0f7fbb2b29f4e678384da2a6a908d76df5ff037 100644 (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++)