Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name
От | Kuntal Ghosh |
---|---|
Тема | Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name |
Дата | |
Msg-id | CAGz5QCKVwMktJ5kTh7_iWx6XciDQCshhmdACJNvrpGwRsh2c7Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name (Euler Taveira <euler@timbira.com.br>) |
Ответы |
Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name
Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name |
Список | pgsql-hackers |
On Tue, May 23, 2017 at 10:56 AM, Euler Taveira <euler@timbira.com.br> wrote: > 2017-05-22 17:52 GMT-03:00 Dmitry Dolgov <9erthalion6@gmail.com>: >> >> 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 >> > The command succeed even if slot_name is invalid. That's because slot_name > isn't validated. ReplicationSlotValidateName() should be called in > parse_subscription_options() to avoid a pilot error. IMHO we should prevent > a future error (use of invalid slot name). > +1. Since, slot_name can be provided even when create_slot is set false, it should be validated as well while creating the subscription. -- Thanks & Regards, Kuntal Ghosh EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: