Improve CREATE SUBSCRIPTION option parsing
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 18 May 2017 00:47:37 +0000 (20:47 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 18 May 2017 00:47:37 +0000 (20:47 -0400)
commit62345698513cbcb3c48a6dae414abf0f24fd163a
treedce30a85bf9960d030111553ee651ada8b508240
parentce554810329b9b8e862eade08b598148931eb456
Improve CREATE SUBSCRIPTION option parsing

When creating a subscription with slot_name = NONE, we failed to check
that also create_slot = false and enabled = false were set.  This
created an invalid subscription and could later lead to a crash if a
NULL slot name was accessed.  Add more checks around that for
robustness.

Reported-by: tushar <tushar.ahuja@enterprisedb.com>
src/backend/commands/subscriptioncmds.c
src/backend/replication/logical/worker.c
src/test/regress/expected/subscription.out
src/test/regress/sql/subscription.sql