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

Commit87a0491

Browse files
committed
Try to fix caughtup in LR tests.
1 parenteee6665 commit87a0491

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎testgres/pubsub.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,19 @@ def catchup(self, username=None):
186186
Args:
187187
username: remote node's user name.
188188
"""
189-
query="""
190-
select pg_current_wal_lsn() - replay_lsn = 0
191-
from pg_catalog.pg_stat_replication where application_name = '{}'
192-
""".format(self.name)
193189

194190
try:
191+
pub_lsn=pub.node.execute(query="select pg_current_wal_lsn()::text from pg_catalog.pg_stat_replication",
192+
dbname=None,
193+
username=None)# yapf: disable
194+
# create dummy xact
195+
pub.node.execute(query="select txid_current()",dbname=None,username=None)
196+
query="""
197+
select {} - replay_lsn <= 0
198+
from pg_catalog.pg_stat_replication where application_name = '{}'
199+
""".format(pub_lsn,self.name)
200+
201+
195202
# wait until this LSN reaches subscriber
196203
self.pub.node.poll_query_until(
197204
query=query,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp