pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Andy Fan <zhihuifan1213@163.com>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <tmunro@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: the s_lock_stuck on perform_spin_delay
Date: Thu, 25 Jan 2024 15:36:41 +0800
Message-ID: <87il3hvp5n.fsf@163.com> (raw)
In-Reply-To: <20240123200704.icmkv2vromua2dtj@awork3.anarazel.de>
References: <CA+TgmobMJLKnsR_pLnOmRdb7+AzCLdNPFOqG4TAatU1F_4gyaQ@mail.gmail.com>
<87o7dum084.fsf@163.com>
<CAEze2WggP-2Dhocmdhp-LxBzic=MXRgGA_tmv1G_9n-PDt2MQg@mail.gmail.com>
<87h6jkmucz.fsf@163.com>
<CA+TgmoYJoFsn3Mqhj0_0HNgVjtPfahJMgF2Pb7wzDcRFvZuK9w@mail.gmail.com>
<8734uz17va.fsf@163.com>
<87o7diyf3z.fsf@163.com>
<CA+TgmoZNo2hedpnyhr3bMUZ+grzp1+2B4daG6O_NeJPh0QnhMA@mail.gmail.com>
<87edeexznn.fsf@163.com>
<CA+TgmobPBwwVmtth1e0mJYKyLnwN1v7d1OWJ2toiwFrnFAOo-w@mail.gmail.com>
<20240123200704.icmkv2vromua2dtj@awork3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2024-01-18 14:00:58 -0500, Robert Haas wrote:
>> > The LockBufHdr also used init_local_spin_delay / perform_spin_delay
>> > infrastruce and then it has the same issue like ${subject}, it is pretty
>> > like the code in s_lock; Based on my current knowledge, I think we
>> > should add the check there.
>>
>> I'd like to hear from Andres, if possible. @Andres: Should these
>> sanity checks apply only to spin locks per se, or also to buffer
>> header locks?
>
> They also should apply to buffer header locks. The exact same dangers apply
> there. The only reason this isn't using a plain spinlock is that this way we
> can modify more state with a single atomic operation. But all the dangers of
> using spinlocks apply just as well.
Thanks for speaking on this!
--
Best Regards
Andy Fan
view thread (50+ messages) latest in thread
Message-ID: <87il3hvp5n.fsf@163.com> Permalink: ../87il3hvp5n.fsf@163.com/ Also on: postgresql.org/message-id/87il3hvp5n.fsf@163.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-hackers@postgresql.org Cc: zhihuifan1213@163.com, andres@anarazel.de, robertmhaas@gmail.com, boekewurm+postgres@gmail.com, tgl@sss.pgh.pa.us, tmunro@postgresql.org, pgsql-hackers@lists.postgresql.org Subject: Re: the s_lock_stuck on perform_spin_delay In-Reply-To: <87il3hvp5n.fsf@163.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox