[HACKERS] Create subscription with `create_slot=false` and incorrect slot name

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема [HACKERS] Create subscription with `create_slot=false` and incorrect slot name
Дата
Msg-id CA+q6zcU-o4L3TYBPAeuXBrj3dx4kc=GEp6vw=HU5+8XmFS0sUw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name  (Euler Taveira <euler@timbira.com.br>)
Список 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?

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] psql - add special variable to reflect the last query status
Следующее
От: Jeff Janes
Дата:
Сообщение: [HACKERS] ALTER PUBLICATION documentation