From 26f5bafb9904af091548ebeda72761adf8c82397 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Tue, 29 Oct 2024 17:26:53 +0200 Subject: [PATCH] Update test_physical_and_logical_replicaiton.py to reproduce the problem --- .../test_physical_and_logical_replicaiton.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test_runner/regress/test_physical_and_logical_replicaiton.py b/test_runner/regress/test_physical_and_logical_replicaiton.py index 09a2aa5122..a13b7324b0 100644 --- a/test_runner/regress/test_physical_and_logical_replicaiton.py +++ b/test_runner/regress/test_physical_and_logical_replicaiton.py @@ -9,16 +9,19 @@ def test_physical_and_logical_replication(neon_simple_env: NeonEnv, vanilla_pg): """Test read replica of a primary which has a logical replication publication""" env = neon_simple_env +<<<<<<< HEAD <<<<<<< HEAD n_records = 100000 ======= n_records = 1000000 >>>>>>> 7fbb1d150 (Add test for combination of physical and logical replication) +======= + n_records = 200000 +>>>>>>> 8fefd8cd6 (Update test_physical_and_logical_replicaiton.py to reproduce the problem) primary = env.endpoints.create_start( branch_name="main", endpoint_id="primary", - config_lines=["min_wal_size=32MB", "max_wal_size=64MB"], ) p_con = primary.connect() p_cur = p_con.cursor() @@ -47,7 +50,17 @@ def test_physical_and_logical_replication(neon_simple_env: NeonEnv, vanilla_pg): s_cur.execute("select count(*) from t") assert s_cur.fetchall()[0][0] == n_records + # start replica + secondary = env.endpoints.new_replica_start( + origin=primary, + endpoint_id="secondary", + ) + + s_con = secondary.connect() + s_cur = s_con.cursor() + logical_replication_sync(vanilla_pg, primary) + assert vanilla_pg.safe_psql("select count(*) from t")[0][0] == n_records # Check that LR slot is not copied to replica