Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c8b21b0

Browse filesBrowse files
author
Amit Kapila
committed
Fix Subscription test added by commit ce0fdbf.
We want to test the variants of Alter Subscription that are not allowed in the transaction block but for that, we don't need to create a subscription that tries to connect to the publisher. As such, there is no problem with this test but it is good to allow such tests to run with wal_level = minimal and max_wal_senders = 0 so as to keep them consistent with other tests. Reported by buildfarm. Author: Amit Kapila Reviewed-by: Ajin Cherian Discussion: https://postgr.es/m/CAA4eK1Lw0V+e1JPGHDq=+hVACv=14H8sR+2eJ1k3PEgwKmU-jQ@mail.gmail.com
1 parent ce0fdbf commit c8b21b0
Copy full SHA for c8b21b0

File tree

Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed

‎src/test/regress/expected/subscription.out

Copy file name to clipboardExpand all lines: src/test/regress/expected/subscription.out
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,10 @@ ALTER SUBSCRIPTION regress_testsub SET (slot_name = NONE);
201201
(1 row)
202202

203203
DROP SUBSCRIPTION regress_testsub;
204-
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=postgres' PUBLICATION mypub
205-
WITH (enabled = true, create_slot = false, copy_data = false);
204+
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION mypub
205+
WITH (connect = false, create_slot = false, copy_data = false);
206+
WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
207+
ALTER SUBSCRIPTION regress_testsub ENABLE;
206208
-- fail - ALTER SUBSCRIPTION with refresh is not allowed in a transaction
207209
-- block or function
208210
BEGIN;

‎src/test/regress/sql/subscription.sql

Copy file name to clipboardExpand all lines: src/test/regress/sql/subscription.sql
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,10 @@ ALTER SUBSCRIPTION regress_testsub SET (slot_name = NONE);
147147

148148
DROP SUBSCRIPTION regress_testsub;
149149

150-
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=postgres' PUBLICATION mypub
151-
WITH (enabled = true, create_slot = false, copy_data = false);
150+
CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION mypub
151+
WITH (connect = false, create_slot = false, copy_data = false);
152+
153+
ALTER SUBSCRIPTION regress_testsub ENABLE;
152154

153155
-- fail - ALTER SUBSCRIPTION with refresh is not allowed in a transaction
154156
-- block or function

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.