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.94.2) (envelope-from ) id 1rRyB6-00AWTR-P4 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 17:33:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rRyB5-005tq5-OP for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 17:33:43 +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.94.2) (envelope-from ) id 1rRyB5-005tpv-98 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2024 17:33:43 +0000 Received: from m12.mail.163.com ([220.181.12.197]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rRyB0-0039rc-2k for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2024 17:33:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=qhti1scIPw4gGIC4J50qzKGxKns1iavGRQXXwU5IRpI=; b=damci+VMiOj76GxKlnK6YUokwGextbzeC4tc8gmhJNy5bGjr2Vxo+qkOBZl0k7 at2ruBt8TKxZz4okiEHDS07JjVxSlmeRU0a1+d3nC28a8VXQjSfIxS2cHX0n16qU 8OU2iQxAOc6HXpEBrL63gt/4K2Al8HMgKrWmFaXiLKIVs= Received: from b97369165980 (unknown [140.205.118.28]) by zwqz-smtp-mta-g4-3 (Coremail) with SMTP id _____wDnl6_lpq5l7A2QAA--.62379S3; Tue, 23 Jan 2024 01:33:25 +0800 (CST) References: <87plyhvama.fsf@163.com> <87sf37mdqq.fsf@163.com> <87o7dum084.fsf@163.com> <87h6jkmucz.fsf@163.com> <8734uz17va.fsf@163.com> <87o7diyf3z.fsf@163.com> <87edeexznn.fsf@163.com> <87a5p2xc2v.fsf@163.com> <871qadygzz.fsf@163.com> <87wms2w9hn.fsf@163.com> <87o7ddx26q.fsf@163.com> <87cyttwbin.fsf@163.com> <878r4hwatd.fsf@163.com> User-agent: mu4e 1.10.7; emacs 29.1 From: Andy Fan To: Robert Haas Cc: Matthias van de Meent , Andres Freund , Tom Lane , Thomas Munro , pgsql-hackers@lists.postgresql.org Subject: Re: the s_lock_stuck on perform_spin_delay Date: Tue, 23 Jan 2024 01:31:59 +0800 In-reply-to: Message-ID: <874jf5w9wa.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wDnl6_lpq5l7A2QAA--.62379S3 X-Coremail-Antispam: 1Uf129KBjvdXoWruF4kuw4kXr4UJF1ktFWkJFb_yoWfKrc_u3 Wvyas3uanxKF4akws5Aw17XF9rJay8Kr1Yq34kJa17twn3AFyDGws3KrWSvr1xA3WxZrnr Wrn0yF40yrW2kjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRi_MaDUUUUU== X-Originating-IP: [140.205.118.28] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/1tbiQAhtU2VOBLoCpwAAsG List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Mon, Jan 22, 2024 at 12:13=E2=80=AFPM Andy Fan = wrote: >> > On Mon, Jan 22, 2024 at 11:58=E2=80=AFAM Andy Fan wrote: >> >> I get your point! Acquiring an already held spinlock in quickdie is >> >> unlikely to happen, but since our existing infrastructure can handle = it, >> >> then there is no reason to bypass it. >> > >> > No, the existing infrastructure cannot handle that at all. >> >> Actually I mean we can handle it without 0003. am I still wrong? >> Without the 0003, if we acquiring the spin lock which is held by >> ourself already. VerifyNoSpinLocksHeld in SpinLockAcquire should catch >> it. > > But that's only going to run in assert-only builds. The whole point of > the patch set is to tell developers that there are bugs in the code > that need fixing, not to catch problems that actually occur in > production. I see. As to this aspect, then yes. --=20 Best Regards Andy Fan