Re: Implement waiting for wal lsn replay: reloaded
Xuneng Zhou <xunengzhou@gmail.com>
From: Xuneng Zhou <xunengzhou@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>, Peter Eisentraut <peter@eisentraut.org>, Andres Freund <andres@anarazel.de>, Thomas Munro <thomas.munro@gmail.com>, Álvaro Herrera <alvherre@kurilemu.de>, Chao Li <li.evan.chao@gmail.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>, Michael Paquier <michael@paquier.xyz>, jian he <jian.universality@gmail.com>, Tomas Vondra <tomas@vondra.me>, Yura Sokolov <y.sokolov@postgrespro.ru>
Date: 2026-05-23T18:40:30Z
Lists: pgsql-hackers
> > > > I agree with you. But do we actually need a > > wait_for_standby_and_slot_catchup() wrapper. I think we can call > > $node->wait_for_slot_catchup() directly and simplify the fix. Check > > the attached patch. > > > > The patch looks good to me. I agree that the wait_for_slot_catchup is > not needed and could be misleading. This change would make the exact > synchronization point and its intention clearer. The only price we > need to pay here is bringing back the polling. But it seems acceptable > since the cost was there in the pre-wait-for-lsn era. And thanks for > writing the great commit message! > Sorry for copy-pasting the wrong function name. It should be wait_for_catchup(). > Regards, Xuneng Zhou HighGo Software Co., Ltd.