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 1wEllI-004NgL-2c for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 10:21:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEllH-001zjv-3B for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 10:21:51 +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 1wEllH-001zjn-2E for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 10:21:51 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wEllF-00000001uN9-2mHs for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 10:21:50 +0000 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-7d1872504cbso2397322a34.0 for ; Mon, 20 Apr 2026 03:21:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776680509; cv=none; d=google.com; s=arc-20240605; b=jt8fHso3uu3mHb3tyyoj2O7ncBb/2m5kYI4l7sIPeByM83umuZX7jVnBD6DtqEoMsN xVbYHu6vuBm00Jadfv0Wm5/Hc4q17xKXuf8mvE8BiIKkJuorEgAq+Z7KG3Vf4XobEPjX s1sH/KVC+GDobR3p4N4NKpZILawU3ZGwHg0rIgQ3KpXzrCT2t/MvWhm4RmbUSKsg3Y65 ZNfGSpjDRhVtbd0Uu/ZLlyytSfrsaU7i58JiPwSS05A7XvgJTj7cZFrUFCPiRxdgYrMT Gnk55PfWsCE2gew4DqZw1avAYXd474Z/1+URQ7GNlxhZKGBlEPkSTdNyd48cWQ2MEpD+ 1y0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9kARDQar3htXqwB/gINlHjaGjtiBWfUNzk7wIA+rKoM=; fh=Th6wCaPeFv8L6t21ekso+qoeEQ9h8jpCPcSdFR9lCtc=; b=CpOxys3IxqloxkovaGfjnwtrt8unwRDGQA6ebawSokcjhFKap3Ra6uK0/UoONM0twf /d4Ry1Y5jFVEQqdKmPT20RTroWOea+U7i2pHPu9DSN/6RAx65f63BQVJhRgQQ0phOf3L x8yuIYNQC7VtszDaKqxeK+gYmDUihYgyMUIRVy2t9Ye1L2XHF8ZQ+KyBtwF1V8vtIUlL 4bMzRA9bIdUXNLNJLDP6O5hn2kpDvFiVX9Xx2VtDn7BJQE1CpwyifkGe8VlG4mxNOL0Z WhpDBxNbWMzPoCuEjYxhh95qET7i5inKvqy1srbkdie1EvwISAU+Tp2CTwsbt2+cPObg Pm3w==; 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=1776680509; x=1777285309; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9kARDQar3htXqwB/gINlHjaGjtiBWfUNzk7wIA+rKoM=; b=KM5x+9cShjTs4c4iSmg43oZVnkhiaKzbkDQjGaibfkFyHKxYKf2O80bGT9oUzZQAsP XhHLXGpqZNKffvhkwthJPspqkfbLXcBMg0qCbNFpdo2ApgtSYLSfvDvfUCxwPpBjiHO1 kHXcUMMV8qUCbrZQR1cqv37r5MgmjGqjWLHFzBZWDKsqesN/Z0+KGxUwh+3XhKxMyK/r qXBjbQZuF+YiFbgfzyNII0fbmzOPps/I5mitBJXW2DWuARYM9Ho4cPWxf3hAoCUZmr6h LE/qWvmwvL6TIi5EMIbvUq7ud9LvZOYJSzJNfEA/L+luCh+eZX8UAumocyHur6ixt4qC ZnIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776680509; x=1777285309; h=content-transfer-encoding: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=9kARDQar3htXqwB/gINlHjaGjtiBWfUNzk7wIA+rKoM=; b=VkDRzLzYQmlUEiIlomR3IVbPMSTPsT+1KLElMKqNORnqspXpeIgIYkNrEtdspjSXI5 nNwOPlGIk8eMUScupPwIDyozRNI/wF1Hdg+UiMOtCPsdKVnAEmFz98m68cnwpU1CdDDA mFxIorBJ8DSzN/CZQ5tdNZlIekGsPQdu/h6pxcr4Y6tWZTbeb1kZo9ZJ3q73LMkhl1XQ gy1wwO2Gf7beknRjF5saymxGvhg2bcf+4tEZke3s95ZqLnqLjXYBNRDPr6HtSzQSUUHo 58+hGeDL3bz5uUZEem8YN53JafSmGDRt+K0Wsh63GGM4smwmPwoqb/Ck4szmKRu4CemF GHnw== X-Forwarded-Encrypted: i=1; AFNElJ9enjdxVvzGE0HP6JRsOXlTugOPastXB3gAiUv14aUe7LHOC3TqOqvIQbFbfuOn4qC1L8bj576FiqLYM8aE@lists.postgresql.org X-Gm-Message-State: AOJu0Yzwsdw7U4kxD9y4PUBSSbACU+gUJUEHYqG+Ax9l4OFyfiJcFQZd apuXTBtSppNhAG0NMtG+Cm4AgG5Elp+u+wOp55al03Xe4xkUx5c7ZmAr8wTkkQApHyJNIcycFMZ VtDfA3ytvvDl5hS/r1KPhXvdsYQcc3vQBUWw0HpBK9vBf X-Gm-Gg: AeBDietw0fTEgLfjOumeARzD6xOnqPjGqtF2Il0wcSvH2cNNW++T4PgVf5wBJCJ4XGT 8lr/zHU9xyzeg2oE6QqZrY0XzxYsfUiqNhqZDsw5gF1cdC/rVdsv/OzzSXTvNC0nTs5KnhaXUTD ug+q93HFG7dgsHpyu4gpYgIJeHIibSZLJjxe/Xzkud368RL4c7MbV1H8pCo+pQJpPX1f6eOQ6G1 Ak+mWpkDJ2ZkuwGgEOF6Jo5HHgqISXvz1WkKAqTfFa70linIl/W6W3bz1475bfJjjtiVyK/mg9/ 47splFUgBR2kAFPPipzqhK4gEgGjj821XAkEtxO+rH3QnmVg4/UkxMEowzuxgSjctESqq8x8ZZl VtTqlwaIyIN9oEWPGgvmdzAMz2EpEDp38BFsnekfD2gcOp7u9ttk= X-Received: by 2002:a05:6820:630e:b0:694:30fb:e4e2 with SMTP id 006d021491bc7-6946383a0d5mr3739680eaf.33.1776680508748; Mon, 20 Apr 2026 03:21:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alexander Korotkov Date: Mon, 20 Apr 2026 13:21:36 +0300 X-Gm-Features: AQROBzAP0B6un2SFPKaV8UwCUWV5okBVzEye4D6fALqYi_oRBlh8STzNFORUsII Message-ID: Subject: Re: test: avoid redundant standby catchup in 049_wait_for_lsn To: Xuneng Zhou Cc: Michael Paquier , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Apr 18, 2026 at 10:58=E2=80=AFAM Alexander Korotkov wrote: > On Sat, Apr 18, 2026 at 7:20=E2=80=AFAM Xuneng Zhou wrote: > >> On Fri, Apr 17, 2026 at 08:25:35PM +0800, Xuneng Zhou wrote: > >> > The change preserves the same coverage while removing one redundant > >> > replay catch-up on the delayed standby. It appears to reduce the tes= t > >> > runtime by about 7 seconds, though I have looked into why much of th= e > >> > improvement comes from this change alone. > >> > >> Alexander may think differently and remove that, but I disagree. The > >> test is clearly written so as we want two wait checks to happen, for > >> for CREATE FUNCTION, and one for CREATE PROCEDURE. Removing the first > >> check to keep only the second one removes its meaning. In short, I > >> see nothing wrong to deal with here. > > > > > > Thank you for the review. I agree that the two wait checks serve distin= ct purposes and are not redundant. The main motivation for this patch was e= fficiency. In my testing, the new test added approximately 7 seconds to the= runtime, while the creation of the procedure and function completed quickl= y. I suspect the latency stems from the wait-for-catch-up step. When I remo= ved it, the test runtime dropped by about 7 seconds.I haven't yet investiga= ted why the wait is so costly in this case. I should probably look into tha= t before proposing this change. > > On my laptop the time needed to run t/049_wait_for_lsn.pl also drops > from 20 secs to 12 secs. The influence to the runtime of the whole > test suite in parallel would be not that big as CPU time only drops > from 2.16 sec to 2.07 sec. But anyway that's pretty significant. > I've revised comment message a bit and surrounding comments. I'm > going to push this if no objections. Pushed. ------ Regards, Alexander Korotkov Supabase