Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQrIF-001vdr-1d for pgsql-hackers@arkaria.postgresql.org; Sat, 23 May 2026 18:41:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wQrHC-00G2xJ-0p for pgsql-hackers@arkaria.postgresql.org; Sat, 23 May 2026 18:40:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQrHB-00G2xB-2k for pgsql-hackers@lists.postgresql.org; Sat, 23 May 2026 18:40:46 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wQrHB-00000000S8V-0ggk for pgsql-hackers@lists.postgresql.org; Sat, 23 May 2026 18:40:45 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-6877c719cb0so5734084a12.2 for ; Sat, 23 May 2026 11:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779561644; cv=none; d=google.com; s=arc-20240605; b=DTa/Nt45DxUj5RLMnziR0iIgzIT7rxkz2l1cgrv8cDJTbAZN63Hpk0qX/1ZE1P7FFc zZSVsp6HGw3IFWaxfakRe/Zgl94v3l5sfdEW75abTVz9q1gD0aSpbWQSp2FtusHl9K5Q SKks3uhFSa/kcj3A7tXL1m3ZsKxBoM9UPk/wL0Bx013514dMtBOpo2W14XV2yyL9SIL9 Cax9PJhHQm+dR18OWUmv86g5gVh1rF8rvD7OukyKaY7btr8Z5R13rmxpLO3oX6eSKQ3m LUkH01O/3J+sVAOHYzkqMrxaQ+vW+i+UGL2ucX2kjou6RjEL2gZeDRc9/pa0eXXTFZcC ++Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=XYyoPHQHJSFiu8Su0fpdq+qTNuh78nDfC85juLT6znM=; fh=LnAUgBal/Is0mgEFOGPafwgzlUUEn0rL5qVm5c7ENX0=; b=Q/b6NGD7KHcCm62EtFXSjbJtnXh2ZYXW6V4+zuN8yi2OULWTytuoi7+z11kB8JrIcy xLtTMlrb47vziFmrzXIbBpNh8/lmhRIdnttXwQnudINfXhhgddB9DDNGlOE38D7mJJE6 UOK+9g7Vu44wNeZAFb9m1byUpeiJoRaxu0tHb+rxkSEOg24lJtrrNmIWFhQ6wRdfxH8/ P3IXGNK/u3Vf1msOrSkapdTtaXjfIvVvylZuzu684Sf8GpDySXz8dJcCfLwKXVB6Z1H2 JG1ZHLvvDCuzt1XvthaQkjHdfBWbVnvixjSEAIqzIO6z7x5DvNUD7za5yL0pptGgcuGG hezQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779561644; x=1780166444; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XYyoPHQHJSFiu8Su0fpdq+qTNuh78nDfC85juLT6znM=; b=iNQTzVSxWBT7uuN9yKByfnXhL0X1ZJGHrz3fzZdZxC/eTW+ZmZfAg5TL7MsLSWSBkD 1DCXXfzapmo8o/1lFS6EF2NBUwsFtQyt4iZF5oGfJcGr5c2NfZ50YibUPc3D31FzMFiG WvUIw/azQJ9BcBEvbyMK/2OAW0tvcesbn9toTHzV6eHSEYAjCFjkZE8pNfXQJf1UdNtj A9vZdfj3PnWUa5oZKGc+0E5JcXJ6q9XIzW+ZOWUoAsVZ4pIU5imPJcIo4Bu4v9QmJRtM wcra9fA0OQazuCXpgijK4kbt2iRImtODcOa3Vnv7hXz+dwGuS4eIcuK0ZP+GfnxLJYD+ z4Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779561644; x=1780166444; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XYyoPHQHJSFiu8Su0fpdq+qTNuh78nDfC85juLT6znM=; b=nl7Nqn3QMmkWp2x329+qTsVte56A8FZyLMvwBg4hotMF8hlU5B85w/ApffXwQ6jPn9 yuubjanbaHtS65QVsuDBTaTNOygiypyWuErhXIAHMfYMSuy2Y/jX89EgTHtwFB+a6xCq 3kI6s2MNgaPbi/sfber3XmHCNuZjS3jMhKWRkI4mxbQPWc+kBfCRCNFU6H/U3Zy5NYgf pi7ZhjZWVWOgxCNru/eUzawdSwIT+4G9kAAcv2a4RWPXEm3dk7L7t/eOGiSFKR4g6fgt SvWg4BLpuzLetN/LCQ0a7rW6oAhMUcvQ3A2NkAktmLx/fcDkVETow6V3XMfhDz2Ukapb qUAA== X-Forwarded-Encrypted: i=1; AFNElJ8X70U68O6DqG+8JXUoJHd74H9XPPTdZTIyPY2MqlapoeV4NNwhHAK7Wx3HORBUICOeINkGy+wmLyqVIRwf@lists.postgresql.org X-Gm-Message-State: AOJu0Yy526a5V8SaUY1uC4Y3rBSMopn54IKkIqmlPxyknWYGX+dSMMjD Hvj5bhCZYqEGOaizf1hYYSeA90dGH9doxu8YRHK/NbcCiyRvoQMTyIIi9piXkQKE9psOej5BJHr +tQIUeDWT/7/qwrAb/E3qGnI0ti29wdU= X-Gm-Gg: Acq92OFBv2MrdDU/8dPb4CUEy3E2dkmEMQ2cFpMCUjQlDh1t1pK1tTKHsO0SgNjKduJ I0ueEiMEbIROq87CYZZFYOH0mzf99XO5TPVz6mQ/VkhVB68/+fPNL50LA/0lH/IbPF8sVd9i0NJ 7TtchDvrNBLoec9x4cPebDdrnGFL/amcNE9BChOlV6LnyVej9m9TvDUHpMYYHEHgU54i6Z2NE4S XBbSHb8qgKWfOZqFKv20rXqbhymQshp00NMfB/UERZEfHmeCEciQKr8gY7HYDlo5fiyqb7ga14v FIcrLT3et699rN48PonFMghU+CLpeLsCVwrytOVUL2WyeipaFpfcGSgVPgXwXoRUTvoMH9vj/Hz xYWDnkambNAM8UPfkbCw94ByUdYHi/ZgQSlfG39r2 X-Received: by 2002:a17:907:c283:b0:bd5:3b90:1ab6 with SMTP id a640c23a62f3a-bdd27cc795bmr536595066b.35.1779561643285; Sat, 23 May 2026 11:40:43 -0700 (PDT) MIME-Version: 1.0 References: <63f6abc9-c0ae-465d-a4e6-667eca6ea008@gmail.com> In-Reply-To: From: Xuneng Zhou Date: Sat, 23 May 2026 11:40:30 -0700 X-Gm-Features: AVHnY4JHI9YWdaWg66x92ZLzRmfsWwL97057BgjE13gzy_iMCqh1sa_biA1mCM8 Message-ID: Subject: Re: Implement waiting for wal lsn replay: reloaded To: Alexander Korotkov Cc: Alexander Lakhin , Heikki Linnakangas , Peter Eisentraut , Andres Freund , Thomas Munro , =?UTF-8?Q?=C3=81lvaro_Herrera?= , Chao Li , pgsql-hackers , Michael Paquier , jian he , Tomas Vondra , Yura Sokolov Content-Type: multipart/alternative; boundary="0000000000009aa0e20652807bee" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009aa0e20652807bee Content-Type: text/plain; charset="UTF-8" > > > > 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. --0000000000009aa0e20652807bee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

> I agree with you.=C2=A0 But do we actually need a
> wait_for_standby_and_slot_catchup() wrapper.=C2=A0 I think we can call=
> $node->wait_for_slot_catchup() directly and simplify the fix.=C2=A0= 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!
<= br>
Sorry for copy-pasting the wrong function name. = It should be wait_for_catchup().


Regards,Xuneng Zhou
HighGo Software Co., Ltd.
=




--0000000000009aa0e20652807bee--