On Tue, May 23, 2017 at 10:56 AM, Euler Taveira <eu...@timbira.com.br> wrote: > 2017-05-22 17:52 GMT-03:00 Dmitry Dolgov <9erthali...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers