Improve CREATE SUBSCRIPTION option parsing
Peter Eisentraut <peter_e@gmx.net>
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>
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/subscriptioncmds.c | modified | +13 −1 |
| src/backend/replication/logical/worker.c | modified | +9 −0 |
| src/test/regress/expected/subscription.out | modified | +8 −0 |
| src/test/regress/sql/subscription.sql | modified | +4 −0 |