Remove special implementation of pg_promote for PG14

This commit is contained in:
Konstantin Knizhnik
2025-05-27 11:42:29 +03:00
committed by Mikhail Kot
parent 2dc9b4640c
commit 2e35475c9a
2 changed files with 4 additions and 18 deletions

View File

@@ -161,6 +161,8 @@ WalProposerMain(Datum main_arg)
{
WalProposer *wp;
walprop_shared->bgw_started = true;
while (*wal_acceptors_list == '\0')
{
/* Wait until wal acceptors list GUC changes are propagated */

View File

@@ -54,24 +54,8 @@ def test_replica_promotes(neon_simple_env: NeonEnv, pg_version: PgVersion):
secondary_conn = secondary.connect()
secondary_cur = secondary_conn.cursor()
if env.pg_version is PgVersion.V14:
assert secondary.pgdata_dir
signalfile = secondary.pgdata_dir / "standby.signal"
assert signalfile.exists()
signalfile.unlink()
promoted = False
while not promoted:
with secondary.connect() as try_it:
try_cursor = try_it.cursor()
try_cursor.execute(
"SELECT setting FROM pg_settings WHERE name = 'transaction_read_only'"
)
promoted = ("off",) == try_cursor.fetchone()
else:
secondary_cur.execute("SELECT * FROM pg_promote()")
assert secondary_cur.fetchone() == (True,)
secondary_cur.execute("SELECT * FROM pg_promote()")
assert secondary_cur.fetchone() == (True,)
secondary_conn = secondary.connect()
secondary_cur = secondary_conn.cursor()