mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 09:22:55 +00:00
Make test_replica_promote.py pass at pg17
This commit is contained in:
@@ -434,6 +434,7 @@ pub fn empty_shmem() -> crate::bindings::WalproposerShmemState {
|
||||
donor_conninfo: [0; 1024],
|
||||
donor_lsn: 0,
|
||||
mutex: 0,
|
||||
bgw_started: false,
|
||||
mineLastElectedTerm: crate::bindings::pg_atomic_uint64 { value: 0 },
|
||||
backpressureThrottlingTime: crate::bindings::pg_atomic_uint64 { value: 0 },
|
||||
currentClusterSize: crate::bindings::pg_atomic_uint64 { value: 0 },
|
||||
|
||||
@@ -5,14 +5,12 @@ This far, only contains a test that we don't break and that the data is persiste
|
||||
"""
|
||||
|
||||
import psycopg2
|
||||
import pytest
|
||||
import time
|
||||
|
||||
from fixtures.neon_fixtures import Endpoint, NeonEnv, wait_replica_caughtup
|
||||
from fixtures.pg_version import PgVersion
|
||||
from fixtures.log_helper import log
|
||||
from pytest import raises
|
||||
|
||||
@pytest.mark.timeout(6000)
|
||||
def test_replica_promotes(neon_simple_env: NeonEnv, pg_version: PgVersion):
|
||||
"""
|
||||
Test that a replica safely promotes, and can commit data updates which
|
||||
@@ -90,12 +88,8 @@ def test_replica_promotes(neon_simple_env: NeonEnv, pg_version: PgVersion):
|
||||
|
||||
new_primary_cur.execute("select count(*) from t")
|
||||
assert new_primary_cur.fetchone() == (200,)
|
||||
new_primary_cur.execute("select pg_current_wal_flush_lsn()")
|
||||
lsn = new_primary_cur.fetchall()[0][0]
|
||||
log.info(f"New primary flush LSN={lsn}")
|
||||
|
||||
new_primary.stop(mode="immediate")
|
||||
new_primary.hot_standby = False
|
||||
new_primary.start()
|
||||
|
||||
with new_primary.connect() as new_primary_conn:
|
||||
|
||||
2
vendor/postgres-v17
vendored
2
vendor/postgres-v17
vendored
Submodule vendor/postgres-v17 updated: 8be779fd3a...28b88cfedf
2
vendor/revisions.json
vendored
2
vendor/revisions.json
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"v17": [
|
||||
"17.5",
|
||||
"8be779fd3ab9e87206da96a7e4842ef1abf04f44"
|
||||
"28b88cfedf9a6028cf7ea32a80ea15a9bf971803"
|
||||
],
|
||||
"v16": [
|
||||
"16.9",
|
||||
|
||||
Reference in New Issue
Block a user