Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc8b21b0

Browse files
author
Amit Kapila
committed
Fix Subscription test added by commitce0fdbf.
We want to test the variants of Alter Subscription that are not allowed inthe transaction block but for that, we don't need to create a subscriptionthat tries to connect to the publisher. As such, there is no problem withthis test but it is good to allow such tests to run withwal_level = minimal and max_wal_senders = 0 so as to keep them consistentwith other tests.Reported by buildfarm.Author: Amit KapilaReviewed-by: Ajin CherianDiscussion:https://postgr.es/m/CAA4eK1Lw0V+e1JPGHDq=+hVACv=14H8sR+2eJ1k3PEgwKmU-jQ@mail.gmail.com
1 parentce0fdbf commitc8b21b0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines 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

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp