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 1wQLSX-001TKi-2X for pgsql-hackers@arkaria.postgresql.org; Fri, 22 May 2026 08:42:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wQLRW-00CkEB-2Z for pgsql-hackers@arkaria.postgresql.org; Fri, 22 May 2026 08:41:19 +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 1wQLRW-00CkE2-0m for pgsql-hackers@lists.postgresql.org; Fri, 22 May 2026 08:41:19 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wQLRV-00000000FFC-1QFB for pgsql-hackers@lists.postgresql.org; Fri, 22 May 2026 08:41:18 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-47c7b282d73so4615789b6e.3 for ; Fri, 22 May 2026 01:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779439276; cv=none; d=google.com; s=arc-20240605; b=SVg4aoHn9N5NDqiiSm7KS9K1Iab5TBCsiZPrgvEZJ+w+VNF0/Q6fwNw5OzOjTTiU/9 LVYhTJsreK0EV4/ZMXVxRYuiIe4XDFWniXiZ6X/f6fExIFvT3pn89CLN5Vnnp7Ip21RF FECJ+thK5XvwAx1vuEdcrzNU3iP8jYmGlJXZKlaWkPsqKp3MNn+3Smff+Wpbs3scmo2z fP77mVCDg5kvu4Jv0Thw23AIch1+YzZcYt++Tgy2lAWF/r6ea2uxVUZpBrha2joEn4Y3 trjT6A4M3WwjaOM+nV6/rZK6lTMuYOhS7lIE4w8FY7s/a2v3+oXXjbDl3a3wuRMQVI6W EKJg== 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=Ra1XHERNUvYAHUzpFdAM2Qvg/M5s6VoPPnTO85YOwa0=; fh=7OuX2wFGwuZIHNqxj+mkaB2bLxkHT9pEkpGaW4jPOxQ=; b=PEJfZUAJxL6bjByfEJPWAb8M06N5x9TsQ31rKlpFpd/QPSDaJ91WZGhWij9J5DBCJ0 TsEFsHd6O8qh9vl3tjeKEtIruAFfYLbwcm3wP9oM92dKBKkq5EoyKyKXlGOmtmu9tLIB ExMBkPoVo34UteEkI6+qtf9WVqDDm6pvcBS0NxMX0npSz71WPB3Z5HICxxTqnK1SAzTy l8sOlm0YRWEWi2TY1cYg+Rkm644FH08GB36z3I3lfZ37hKQBJqFyNxhB3R8szO0JZSSR DKdGW2vQbKXrgJp1DFK8uOYSCGmKUyOl9oUFK9mGRQ2ux4r3XpJXRVydhmzg2YBgZfSS LA6w==; 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=1779439276; x=1780044076; 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=Ra1XHERNUvYAHUzpFdAM2Qvg/M5s6VoPPnTO85YOwa0=; b=FoAubKUgzdmz5W/8q2jspA/SAU8NwecDKpVrB0XuxUWJnJESB1M5nROeOvMj+VVvhI 8uL7TOFeH7A1kylvgUXvXo/6R5OGL0+pLQ8sF6dXhJySTmAkPIoU3uXTP7RufhciHDxf nS4nCkvTj+VMibTuaBgxNM4x/iQ8mwNLurih+l30jAOi3cf/GERiPt9MlqIanW/I9L5Z a34fE2qtS+TlkFjujmpAAbUGKaxd4SZ1FT1VTm+S1Oi47eJvxrNp7x96KeI+kKqZcXDQ zpaH1COl+GceYuRlWvfUkOhOyI3ZwhN0Inq+JxzAupGnHCVEjDVj2C7Neo8elq8QfLc6 Dz2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779439276; x=1780044076; 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=Ra1XHERNUvYAHUzpFdAM2Qvg/M5s6VoPPnTO85YOwa0=; b=PuLIelxdmKPG2ozr9vr0+VKxMsKRS/lgiGp1/bnX6Qy+Jyhgnd1r8cpbo7LThz4HLd HJNQN+QR2Scru9Vm8eJvltgq+Zkyloh0GYkQWsa978D9hcnoSit0+Z/VidLhx7x241V/ aOM30Cg4FbtL2DxiGafqoEPwPT9Dt6Gdy6y9bPteVOw4Ro6OlM91XUZ/pnpWYaXa0i38 e2XSE8pUgs97eKV7M5MMABE6k4sp8ch6mkkBGopdmNlVpvPtc3g8QNkq9ndOnX2YcfJE TWsj/lPRKhNiKsOELmhq9U6Sm2qBuO996647VKbc1Y9Qh1OqYEqp8xoRoq/cCqDTl9m6 oSHA== X-Forwarded-Encrypted: i=1; AFNElJ97aqXE8tb7IAnDhCGAapLzNVXTFag+bnYoDpgIv2yXt9hA/Klakkh4EH9u3eykAds9zaOfXD9BS7LlHtGs@lists.postgresql.org X-Gm-Message-State: AOJu0YyMJS/3OKNT3jCNmBajJ/UqNpBNJZF8pQoz3gDQwthDObYwHhuz bYl61j9H7ui68PvI2rvceU04H+eGSfokE6xdYPNgjLE1o+Enzo+AvIK1kpS0+eDYslYkdEzsuF9 b8tBeYwdM8YzEyOK6FCcgblLa9M4CWRs= X-Gm-Gg: Acq92OFDxuKeEWa01L8RCJLNcHrszcCNWAa+Sdfjp0BGqwwog0lwR+R5ckjjuvvzLDx EwdeOHGXFTCI1gmbKtPMBiCEPexbHUrLtHg53kWAJ7eVfl/SB338a+eWY+YfNNlnuJPhaJjANJ9 7S5OS+6+uB1niOd11h/9rRTorbeggpjydDURY32aWyB8SXlhg7O1a8urtX8T4sF3l8VIJTx67AM LQmxDrS3UxrnQI31qEJIbkIuvPU+UlwZ/c34IzI1sQywQfqQxT1DceVhb6Oi0wg0SV0Hfdn0dWQ 8xhejGoYZGikCcKr1pXZKFdlmiIMYpL+FdR890h9v3/NYVz+JmA= X-Received: by 2002:a05:6808:c2f9:b0:472:cd4c:c36f with SMTP id 5614622812f47-48549ecfcd3mr1546164b6e.3.1779439276291; Fri, 22 May 2026 01:41:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: JoongHyuk Shin Date: Fri, 22 May 2026 17:41:03 +0900 X-Gm-Features: AVHnY4KOVbvODKp72A5Icq_tGrD436W5JixxkJ4rMnLg2tyxgPp-8vhNFtLhDJU Message-ID: Subject: Re: [PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: Michael Paquier , Fujii Masao , "pgsql-hackers@lists.postgresql.org" , Vitaly Davydov Content-Type: multipart/alternative; boundary="000000000000f67a3f065263fdf1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f67a3f065263fdf1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello. Same function, different races, I think. Vitaly reports a missed wake-up where deadlock_timeout never fires (spurious SIGALRM from log_startup_progress_interval plus the lazy setitimer in 09cf1d52). This patch addresses the opposite, deadlock_timeout does fire, but LockBufferForCleanup loops back and re-arms it, so the signal repeats once per second. The two fixes do not overlap (the added ProcWaitForSignal sits inside the deadlock branch that Vitaly's scenario never reaches). --=20 JH Shin On Wed, May 20, 2026 at 7:15=E2=80=AFAM =C3=81lvaro Herrera wrote: > Hello, > > On 2026-Apr-21, Michael Paquier wrote: > > > On Tue, Apr 21, 2026 at 02:42:38PM +0900, Fujii Masao wrote: > > > Since this change improves recovery-conflict behavior rather than > fixing a bug, > > > it doesn't seem to need backpatching and we may need to wait until v2= 0 > > > development opens (probably July) before committing it. > > > > Yeah, this one is an improvement, not an actual bug, so let's wait for > > v20 if worth doing (I did not check it). > > Hmm, is this related to > https://postgr.es/m/44c24dcf-5710-410f-b1b6-d10b315f3d51@postgrespro.ru ? > In there, Vitaly claims to be reporting a bug that goes back to pg15, > which contradicts this assessment. > > Regards, > > -- > =C3=81lvaro Herrera Breisgau, Deutschland =E2=80=94 > https://www.EnterpriseDB.com/ > "=C2=BFQu=C3=A9 importan los a=C3=B1os? Lo que realmente importa es comp= robar que > a fin de cuentas la mejor edad de la vida es estar vivo" (Mafalda) > --000000000000f67a3f065263fdf1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

Same function, different races, I think.
= Vitaly reports a missed wake-up where deadlock_timeout never fires
(spu= rious SIGALRM from log_startup_progress_interval plus the lazy setitimer in= 09cf1d52).
This patch addresses the opposite,
deadlock_timeout does = fire, but LockBufferForCleanup loops back and re-arms it,
so the signal = repeats once per second.

The two fixes do not overlap
(the added= ProcWaitForSignal sits inside the deadlock branch that Vitaly's scenar= io never reaches).

--
JH Shin

On Wed, May 2= 0, 2026 at 7:15=E2=80=AFAM =C3=81lvaro Herrera <alvherre@kurilemu.de> wrote:
Hello,

On 2026-Apr-21, Michael Paquier wrote:

> On Tue, Apr 21, 2026 at 02:42:38PM +0900, Fujii Masao wrote:
> > Since this change improves recovery-conflict behavior rather than= fixing a bug,
> > it doesn't seem to need backpatching and we may need to wait = until v20
> > development opens (probably July) before committing it.
>
> Yeah, this one is an improvement, not an actual bug, so let's wait= for
> v20 if worth doing (I did not check it).

Hmm, is this related to
https://postgr.es/m/44c24dcf-= 5710-410f-b1b6-d10b315f3d51@postgrespro.ru ?
In there, Vitaly claims to be reporting a bug that goes back to pg15,
which contradicts this assessment.

Regards,

--
=C3=81lvaro Herrera=C2=A0 =C2=A0 =C2=A0 =C2=A0 Breisgau, Deutschland=C2=A0 = =E2=80=94=C2=A0 https://www.EnterpriseDB.com/
"=C2=BFQu=C3=A9 importan los a=C3=B1os?=C2=A0 Lo que realmente importa= es comprobar que
a fin de cuentas la mejor edad de la vida es estar vivo"=C2=A0 (Mafald= a)
--000000000000f67a3f065263fdf1--