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 1wEp57-004RrO-2Y for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 13:54:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEp56-0033sh-2M for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 13:54:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wEp56-0033sY-1Q for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 13:54:32 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wEp54-000000028hJ-1mKs for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 13:54:32 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-6745a88eec7so3642603a12.2 for ; Mon, 20 Apr 2026 06:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776693269; cv=none; d=google.com; s=arc-20240605; b=PVuMIhzbvvvNj/rX57duih7BJFL2Zbq2eO1WO7TuQG7QPEXdLxaw5xDhX4/ra6Rjx6 K63mkDjtc3r5ZJcz/0/TXpM4cd8a7Y+g7l9/24jSz7ydgzoUhTpS73tPMFtJYooaQXYE Cl6GWskKlKKjuhcBRVMndyVTEeQmow3J1vTWnjFVnpd4vVG43/U1lRLsaW8QyJLwGJzg 3AdzPikMMrvYuF1A8JDBuk+qQ1V3gw0VSoBHRvIzXSD/x/GE8P59n8yYlrQrjYxg6hwN u48vPaM9gZJEh3dYeUl8cZkS1AdS5ze9rJyIY05FDPF66baziQjsOBD10PlcuzCp1Rz3 b/ag== 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=G4TGaohxlxw4vOIiA2SgYtdwlu66zjEb3ewPdtrU9e4=; fh=V9QM7rt/MnfbVdhP8PXbByHchqeLpgGJXzuZPgNBQLY=; b=DM07zxVKH3bZ51FXMJXn8bY+rflNGRs/+FvI71KjreQOq+bfXX5JqGUfRJML/ArbF8 vLqlS8Dlh9Z6JakG4RopG/2Ajs1afCPAzL/TmWh28gmw6xZ4RzFsUNfRDp3OpeToC8kd 6NuRr3kUHx4cwPOWB1v7xZjMWUYQh4/dZQFylLjK0WNtHyOfxuBp7RL1Fswx0PA+Sjhr UYUeUsi4fy5aC3yWyxE+ezhX/454ze6g+GuaMpTcVkXiKF3vbFnzNLw10op8Zp+9ztRg gURljwplyfDoZFekZNpCfqDbaih2IxBq0hIP8Jr42W1ayt3THRWww0RxnhBa4bFjHMlV EaPA==; 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=1776693269; x=1777298069; 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=G4TGaohxlxw4vOIiA2SgYtdwlu66zjEb3ewPdtrU9e4=; b=nCWv7mJIyBRZTDPkMBkMqmTRXK5PaBEYklnH73VhhEjvrxN80gBWVTp+S5sDtp8WoH 7I63WjvQ2JmMURAOmg++lAPchhkgTvnrFEfhrhorNakXGnN4E1l0qtW6txJgwm0bl0we OpCkGCjdbPZQsACIQLyiYfv71c/3YSPKMJJ65TeB86PP+qD4rZu3hmKuPDM7bE4tP7Ik Yz3NaDQ3b3XicfGQos9+DP9JaR5gPnN/LQj2OGZucCU6jyn5uwIGuw1zVBGERJCFZBg5 EM0ibhqHiIJEArRlArjwsuSUXpgBxyzu79+hyLK1A/mOBdY244eopO8H+QMZA9jLktl/ xEBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776693269; x=1777298069; 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=G4TGaohxlxw4vOIiA2SgYtdwlu66zjEb3ewPdtrU9e4=; b=qSOaJg0s77xw3GXQmRX3i8s6b7Ae9TNdo8pL2lkfTxLJzMcHdLdcZEVP1ci5PVf0CP dCF+teNPCYuwdohDHU2CTL0eldO6dEWis/j7ZH1G3ghGY49zNhtV9GNjtn56HPF1rjfw XDUuRZbqMaW5qm1LbSGsdU3Df1ZhR56Fex6B5+bj+1Y9fjoA/gk/VAwi9RLub5Ud1rmd 8Jqfg9oE5ExkiZHNDLBSi4WiU/8+SQc8E3nHTludNemUtx7aYaQEkNHZdVhIP7ES0LPt ll7FSm0slcEfPxn0vzUjiAZloVWouJgJ9Q1F2V9w8ImBm8hRZkvDtZaKKnshg02F+04+ n93w== X-Forwarded-Encrypted: i=1; AFNElJ8RaVhTb+fLo1vtHSk63V3vX+wm5zBz8e/lJCICOrF0qanyGaqk8TwxTnXV2+20wwVtd05CF0nYEzgvYyOX@lists.postgresql.org X-Gm-Message-State: AOJu0YwcDbPluJlJaL8ABILCuAZJC3k12Lk3LhvUDSYmt0r+wSADwT2Y /g7viXtV7YFJXoKliKT/doUX3c5Xk9rPME8OX3jnmR+47Hbax2l/6lcFAG8A/LmIh4df2u2XlBd va4Xxgc5eEeHFQhP4kvuTGu/pzHuX+yA= X-Gm-Gg: AeBDievObx6eZoCQLTTZAzejQyxDNElHsL0IkI8OOPRUMpoDo495BMRo7lW5AI4wA9n xJ5cFV/EOdrv5Mrr8HwzTZh4RJVHgJQye6TTy647pxhKHpZnAcUI6gXy7Ll8mGaE3d5YDio2hVs uJ7y1Kl4t7+fZAkaKxaxFNAVRXmlHa2sZFuxpfgx+FgBKKbjWiO+1E+J8wi/sSNCB0ZUUMaxiCG uwF2YhQ3qH3NI05ybMl47DZwiEypE41RqoIjB9g1QYwAPxKdHSbseYSw4pIABIYL1NDQa7XbeBO PFKUtfohtgQcsLb5NNIeu0gxpz+cQmOGR2g0fBgf9u2451WuwMh3L28sz/Ce5uReGPn1xtk2uHw gTxsvB8cf6prRSiC3 X-Received: by 2002:aa7:d9d3:0:b0:672:40fd:d7cc with SMTP id 4fb4d7f45d1cf-672bfd875f8mr4373062a12.6.1776693269247; Mon, 20 Apr 2026 06:54:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Xuneng Zhou Date: Mon, 20 Apr 2026 21:54:16 +0800 X-Gm-Features: AQROBzDMAQjTl5nIvdcRuVPOpauFa43fvAIL2L7TxsXk_qRBNn_hAMjJMKQl0aQ Message-ID: Subject: Re: test: avoid redundant standby catchup in 049_wait_for_lsn To: Alexander Korotkov 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 Mon, Apr 20, 2026 at 6:21=E2=80=AFPM Alexander Korotkov wrote: > > 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 redundan= t > > >> > replay catch-up on the delayed standby. It appears to reduce the t= est > > >> > runtime by about 7 seconds, though I have looked into why much of = the > > >> > improvement comes from this change alone. > > >> > > >> Alexander may think differently and remove that, but I disagree. Th= e > > >> test is clearly written so as we want two wait checks to happen, for > > >> for CREATE FUNCTION, and one for CREATE PROCEDURE. Removing the fir= st > > >> 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 dist= inct purposes and are not redundant. The main motivation for this patch was= efficiency. In my testing, the new test added approximately 7 seconds to t= he runtime, while the creation of the procedure and function completed quic= kly. I suspect the latency stems from the wait-for-catch-up step. When I re= moved it, the test runtime dropped by about 7 seconds.I haven't yet investi= gated why the wait is so costly in this case. I should probably look into t= hat 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. > Thanks for pushing it. I haven't had time to investigate the latency yet, but will do it later. Best, Xuneng