From: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Create subscription with `create_slot=false` and incorrect slot name |
Date: | 2017-05-22 20:52:29 |
Message-ID: | CA+q6zcU-o4L3TYBPAeuXBrj3dx4kc=GEp6vw=HU5+8XmFS0sUw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
Maybe this question was already raised before, but I couldn't find a
discussion. When I'm creating a subscription with `create_slot=false` looks
like it's possible to pass a slot name with invalid characters. In this
particular case both publisher and subscriber were on the same machine:
=# CREATE SUBSCRIPTION test_sub CONNECTION 'dbname=db host=host
port=port user=user' PUBLICATION test_pub WITH (create_slot=false,
slot_name='test slot');
NOTICE: 00000: synchronized table states
LOCATION: CreateSubscription, subscriptioncmds.c:443
CREATE SUBSCRIPTION
Time: 5.887 ms
Of course `test slot` doesn't exist, because I can't create a slot with
incorrect name. And consequently I can't drop this subscription:
=# DROP SUBSCRIPTION test_sub;
ERROR: XX000: could not drop the replication slot "test slot" on
publisher
DETAIL: The error was: ERROR: replication slot name "test slot"
contains invalid character
HINT: Replication slot names may only contain lower case letters,
numbers, and the underscore character.
LOCATION: DropSubscription, subscriptioncmds.c:947
Time: 2.615 ms
=# CREATE SUBSCRIPTION test_sub CONNECTION 'dbname=db host=host
port=port user=user' PUBLICATION test_pub WITH (create_slot=false,
slot_name='test slot');
ERROR: 42710: subscription "test_sub" already exists
LOCATION: CreateSubscription, subscriptioncmds.c:344
Time: 0.492 ms
Is it an issue or I'm doing something wrong?
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2017-05-22 21:50:08 | ALTER PUBLICATION documentation |
Previous Message | Pavel Stehule | 2017-05-22 19:48:25 | Re: psql - add special variable to reflect the last query status |