From 9424ff98cece61fcacd47bc9b9cb0dccd523e518 Mon Sep 17 00:00:00 2001
From: GremSnoort <grem_snoort@protonmail.com>
Date: Thu, 9 Oct 2025 15:28:20 +0300
Subject: [PATCH] Fix logical replication setup in subscription test
 t/009_matviews.pl

---
 src/test/subscription/t/009_matviews.pl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/test/subscription/t/009_matviews.pl b/src/test/subscription/t/009_matviews.pl
index 9316fd1bb6d..2389680af13 100644
--- a/src/test/subscription/t/009_matviews.pl
+++ b/src/test/subscription/t/009_matviews.pl
@@ -18,20 +18,20 @@ $node_subscriber->start;
 
 my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres';
 
+$node_publisher->safe_psql('postgres',
+	q{CREATE TABLE test1 (a int PRIMARY KEY, b text)});
+$node_subscriber->safe_psql('postgres',
+	q{CREATE TABLE test1 (a int PRIMARY KEY, b text);});
+
 $node_publisher->safe_psql('postgres',
 	"CREATE PUBLICATION mypub FOR ALL TABLES;");
 $node_subscriber->safe_psql('postgres',
 	"CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr' PUBLICATION mypub;"
 );
 
-$node_publisher->safe_psql('postgres',
-	q{CREATE TABLE test1 (a int PRIMARY KEY, b text)});
 $node_publisher->safe_psql('postgres',
 	q{INSERT INTO test1 (a, b) VALUES (1, 'one'), (2, 'two');});
 
-$node_subscriber->safe_psql('postgres',
-	q{CREATE TABLE test1 (a int PRIMARY KEY, b text);});
-
 $node_publisher->wait_for_catchup('mysub');
 
 # Materialized views are not supported by logical replication, but

base-commit: 36fd8bde1b77191eaf7d3499052c0636b6b93a87
-- 
2.43.0

