Re: Spinlock can be released twice in procsignal.c - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Spinlock can be released twice in procsignal.c
Date
Msg-id Z7-1-d3ZQs4QZgSk@paquier.xyz
Whole thread Raw
In response to Re: Spinlock can be released twice in procsignal.c  (Maxim Orlov <orlovmg@gmail.com>)
Responses Re: Spinlock can be released twice in procsignal.c
List pgsql-hackers
On Wed, Feb 26, 2025 at 12:33:16PM +0300, Maxim Orlov wrote:
> Done. Except for a new name for "logit" variable. Unfortunately, I can't
> think of anything sane. As an example I looked at sequence.c. The same name
> is used there. I will gladly change this name to whatever you want if it
> still look misleading or incomplete for you in some way or another. Just
> write the name that you think is correct.

"old_pss_pid", because this is an old pss_pid value from a previous
slot.  Keeping the value around after releasing the slot is also
useful for debugging, so rather than a boolean it is possible to use a
uint32.  The "sanity check" comment was also a bit out-of-order
because it was written just before acquiring the spinlock.

Tweaked a bit the whole, and the result looked OK so applied on HEAD.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Proposal: "query_work_mem" GUC, to distribute working memory to the query's individual operators
Next
From: Robert Haas
Date:
Subject: Re: Anti join confusion