Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5fe963

Browse files
committed
Use pg_is_in_recovery() instead of relying on transaction_read_only GUC variable in promote() func
1 parent4f2b77d commitf5fe963

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎testgres/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,11 +713,11 @@ def promote(self, dbname=None, username=None):
713713
# for versions below 10 `promote` is asynchronous so we need to wait
714714
# until it actually becomes writable
715715
ifself._pg_version<'10':
716-
check_query="SHOW transaction_read_only"
716+
check_query="SELECT pg_is_in_recovery()"
717717

718718
self.poll_query_until(
719719
query=check_query,
720-
expected="off",
720+
expected=False,
721721
dbname=dbname,
722722
username=username,
723723
max_attempts=0)# infinite

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp