pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andy Fan <zhihuifan1213@163.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
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: Fri, 19 Jan 2024 10:51:43 +0800
Message-ID: <87a5p2xc2v.fsf@163.com> (raw )
In-Reply-To: <CA+TgmobPBwwVmtth1e0mJYKyLnwN1v7d1OWJ2toiwFrnFAOo-w@mail.gmail.com >
References: <87plyhvama.fsf@163.com >
<CA+Tgmob=RA_y4shbtodwRRhC9uwDSWnBHY=3EvnJ_txtAWoD9A@mail.gmail.com >
<489987.1704381735@sss.pgh.pa.us >
<CA+Tgmoa=q9KZ-2u8Cx35D_7HSa8YKzvfA5ffvd876_UZ2LEU3Q@mail.gmail.com >
<498328.1704386013@sss.pgh.pa.us >
<CA+TgmoaA2uqsozTj9UDNrXTKWiUz1kW9eQsKiCr9ZvPwaFGFDA@mail.gmail.com >
<20240104225403.dgmbbfffmm3srpgq@awork3.anarazel.de >
<871qaso7ub.fsf@163.com >
<CA+TgmoabLxQCbnatgdcO_VZKQtZqnj4c0zg3ovavqBZBh+QYcA@mail.gmail.com >
<87sf37mdqq.fsf@163.com >
<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 >
Hi,
Here is the summary of the open-items, it would be great that Andres and
Matthias have a look at this when they have time.
1. Shall we treat the LockBufHdr as a SpinLock usage.
>> 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?
>
2. Where shall we put the START/END_SPIN_LOCK() into? Personally I'd
like spin.h. One of the reasons is 'misc' usually makes me think they
are something not well categoried, and hence many different stuffs are
put together.
>> they were put into spin.h in v1 but later move to miscadmin.h at [1].
>> [1]
>> https://www.postgresql.org/message-id/CAEze2WggP-2Dhocmdhp-LxBzic%3DMXRgGA_tmv1G_9n-PDt2MQg%40mail.g...
>
> I'm not entirely sure what the right thing to do is here, and the
> answer may depend on the previous question. But I disagree with
> Matthias -- I don't think miscadmin.h can be the right answer
> regardless.
>
--
Best Regards
Andy Fan
view thread (50+ messages) latest in thread
Message-ID: <87a5p2xc2v.fsf@163.com>
Permalink: ../87a5p2xc2v.fsf@163.com/
Also on: postgresql.org/message-id/87a5p2xc2v.fsf@163.com
copy link · copy postgr.es
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, robertmhaas@gmail.com, boekewurm+postgres@gmail.com, andres@anarazel.de, 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: <87a5p2xc2v.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