@@ -29,7 +29,8 @@ CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUB
29
29
ERROR: publication name "foo" used more than once
30
30
-- ok
31
31
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false);
32
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
32
+ WARNING: subscription was created, but is not connected
33
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
33
34
COMMENT ON SUBSCRIPTION regress_testsub IS 'test subscription';
34
35
SELECT obj_description(s.oid, 'pg_subscription') FROM pg_subscription s;
35
36
obj_description
@@ -98,7 +99,8 @@ CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PU
98
99
ERROR: subscription with slot_name = NONE must also set enabled = false
99
100
-- ok - with slot_name = NONE
100
101
CREATE SUBSCRIPTION regress_testsub3 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, connect = false);
101
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
102
+ WARNING: subscription was created, but is not connected
103
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
102
104
-- fail
103
105
ALTER SUBSCRIPTION regress_testsub3 ENABLE;
104
106
ERROR: cannot enable subscription that does not have a slot name
@@ -109,7 +111,8 @@ CREATE SUBSCRIPTION regress_testsub4 CONNECTION 'dbname=regress_doesnotexist' PU
109
111
ERROR: unrecognized origin value: "foo"
110
112
-- now it works
111
113
CREATE SUBSCRIPTION regress_testsub4 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, connect = false, origin = none);
112
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
114
+ WARNING: subscription was created, but is not connected
115
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
113
116
\dRs+ regress_testsub4
114
117
List of subscriptions
115
118
Name | Owner | Enabled | Publication | Binary | Streaming | Two-phase commit | Disable on error | Origin | Synchronous commit | Conninfo | Skip LSN
@@ -233,7 +236,8 @@ CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUB
233
236
ERROR: binary requires a Boolean value
234
237
-- now it works
235
238
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, binary = true);
236
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
239
+ WARNING: subscription was created, but is not connected
240
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
237
241
\dRs+
238
242
List of subscriptions
239
243
Name | Owner | Enabled | Publication | Binary | Streaming | Two-phase commit | Disable on error | Origin | Synchronous commit | Conninfo | Skip LSN
@@ -256,7 +260,8 @@ CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUB
256
260
ERROR: streaming requires a Boolean value
257
261
-- now it works
258
262
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, streaming = true);
259
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
263
+ WARNING: subscription was created, but is not connected
264
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
260
265
\dRs+
261
266
List of subscriptions
262
267
Name | Owner | Enabled | Publication | Binary | Streaming | Two-phase commit | Disable on error | Origin | Synchronous commit | Conninfo | Skip LSN
@@ -312,7 +317,8 @@ ALTER SUBSCRIPTION regress_testsub DROP PUBLICATION testpub1, testpub2 WITH (ref
312
317
DROP SUBSCRIPTION regress_testsub;
313
318
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION mypub
314
319
WITH (connect = false, create_slot = false, copy_data = false);
315
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
320
+ WARNING: subscription was created, but is not connected
321
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
316
322
ALTER SUBSCRIPTION regress_testsub ENABLE;
317
323
-- fail - ALTER SUBSCRIPTION with refresh is not allowed in a transaction
318
324
-- block or function
@@ -338,7 +344,8 @@ CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUB
338
344
ERROR: two_phase requires a Boolean value
339
345
-- now it works
340
346
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, two_phase = true);
341
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
347
+ WARNING: subscription was created, but is not connected
348
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
342
349
\dRs+
343
350
List of subscriptions
344
351
Name | Owner | Enabled | Publication | Binary | Streaming | Two-phase commit | Disable on error | Origin | Synchronous commit | Conninfo | Skip LSN
@@ -362,7 +369,8 @@ ALTER SUBSCRIPTION regress_testsub SET (slot_name = NONE);
362
369
DROP SUBSCRIPTION regress_testsub;
363
370
-- two_phase and streaming are compatible.
364
371
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, streaming = true, two_phase = true);
365
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
372
+ WARNING: subscription was created, but is not connected
373
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
366
374
\dRs+
367
375
List of subscriptions
368
376
Name | Owner | Enabled | Publication | Binary | Streaming | Two-phase commit | Disable on error | Origin | Synchronous commit | Conninfo | Skip LSN
@@ -377,7 +385,8 @@ CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUB
377
385
ERROR: disable_on_error requires a Boolean value
378
386
-- now it works
379
387
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, disable_on_error = false);
380
- WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
388
+ WARNING: subscription was created, but is not connected
389
+ HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
381
390
\dRs+
382
391
List of subscriptions
383
392
Name | Owner | Enabled | Publication | Binary | Streaming | Two-phase commit | Disable on error | Origin | Synchronous commit | Conninfo | Skip LSN
0 commit comments