From: | Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> |
---|---|
To: | Euler Taveira <euler(at)timbira(dot)com(dot)br> |
Cc: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Create subscription with `create_slot=false` and incorrect slot name |
Date: | 2017-05-23 06:33:15 |
Message-ID: | CAGz5QCKVwMktJ5kTh7_iWx6XciDQCshhmdACJNvrpGwRsh2c7Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 23, 2017 at 10:56 AM, Euler Taveira <euler(at)timbira(dot)com(dot)br> wrote:
> 2017-05-22 17:52 GMT-03:00 Dmitry Dolgov <9erthalion6(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | vinayak | 2017-05-23 06:52:05 | ECPG: pg_type.h file is not synced |
Previous Message | tushar | 2017-05-23 05:46:29 | Re: Getting server crash after running sqlsmith |