@@ -45,6 +45,26 @@ SET SESSION AUTHORIZATION 'regress_subscription_user2';
4545CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION foo WITH (connect = false);
4646ERROR: must be superuser to create subscriptions
4747SET SESSION AUTHORIZATION 'regress_subscription_user';
48+ -- fail - invalid option combinations
49+ CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (connect = false, copy_data = true);
50+ ERROR: connect = false and copy_data = true are mutually exclusive options
51+ CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (connect = false, enabled = true);
52+ ERROR: connect = false and enabled = true are mutually exclusive options
53+ CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (connect = false, create_slot = true);
54+ ERROR: connect = false and create_slot = true are mutually exclusive options
55+ CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, enabled = true);
56+ ERROR: slot_name = NONE and enabled = true are mutually exclusive options
57+ CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, create_slot = true);
58+ ERROR: slot_name = NONE and create_slot = true are mutually exclusive options
59+ -- ok - with slot_name = NONE
60+ CREATE SUBSCRIPTION testsub3 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, connect = false);
61+ WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
62+ -- fail
63+ ALTER SUBSCRIPTION testsub3 ENABLE;
64+ ERROR: cannot enable subscription that does not have a slot name
65+ ALTER SUBSCRIPTION testsub3 REFRESH PUBLICATION;
66+ ERROR: ALTER SUBSCRIPTION ... REFRESH is not allowed for disabled subscriptions
67+ DROP SUBSCRIPTION testsub3;
4868-- fail - invalid connection string
4969ALTER SUBSCRIPTION testsub CONNECTION 'foobar';
5070ERROR: invalid connection string syntax: missing "=" after "foobar" in connection info string
0 commit comments