Re: Little cleanup: Move ProcStructLock to the ProcGlobal struct

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Little cleanup: Move ProcStructLock to the ProcGlobal struct
Date: 2026-02-11 15:29:00
Message-ID: 4100316.1770823740@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> On 11/02/2026 16:52, Tom Lane wrote:
>> This is not a great situation. I wonder if we can put back some
>> mode that could be used by a few BF members to catch such oversights.

> Do we still support any architectures where initializing the spinlock to
> all-zeros doesn't do the right thing? Could we accept that all-zeros is
> a valid initialization of a spinlock?

I'm not terribly comfortable with that: it seems short-sighted.
Even today, on platforms where we use __sync_lock_test_and_set /
__sync_lock_release, the gcc manual does not quite promise that
the released state is all-zero.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2026-02-11 16:07:37 Re: Improving GUC prefix ownership for extensions
Previous Message Heikki Linnakangas 2026-02-11 15:05:27 Re: Little cleanup: Move ProcStructLock to the ProcGlobal struct