From b1eb0e135edfbadaa5f2efcbc5f218b6905e07be Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Wed, 22 May 2024 15:54:17 +0300 Subject: [PATCH] Fix test_replication_start_subxid_overflow.py test --- test_runner/regress/test_replication_start_subxid_overflow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_runner/regress/test_replication_start_subxid_overflow.py b/test_runner/regress/test_replication_start_subxid_overflow.py index faf1fab2fe..6a3a4559f7 100644 --- a/test_runner/regress/test_replication_start_subxid_overflow.py +++ b/test_runner/regress/test_replication_start_subxid_overflow.py @@ -2,6 +2,9 @@ from fixtures.log_helper import log from fixtures.neon_fixtures import NeonEnv, wait_for_last_flush_lsn, wait_replica_caughtup +# This test replica startup in case of large number of active subtransactions at primary node. +# Number of known transaction xids is limited and if we do not limit number of transactions +# restored from CLOG, then it will cause crash of replica. def test_replication_start_subxid_overflow(neon_simple_env: NeonEnv): env = neon_simple_env @@ -26,6 +29,7 @@ def test_replication_start_subxid_overflow(neon_simple_env: NeonEnv): end; $$ language plpgsql""" ) p_cur.execute("select create_subxacts(100000)") + p_cur.execute("select txid_current()") xid = p_cur.fetchall()[0][0] log.info(f"Master transaction {xid}") with env.endpoints.new_replica_start(