mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 17:02:56 +00:00
Remove special implementation of pg_promote for PG14
This commit is contained in:
@@ -159,6 +159,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 */
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user