Re: Little cleanup: Move ProcStructLock to the ProcGlobal struct

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Little cleanup: Move ProcStructLock to the ProcGlobal struct
Дата
Msg-id 11adb849-bca6-42ea-addd-c3dbc7ba2187@iki.fi
обсуждение
Ответ на Re: Little cleanup: Move ProcStructLock to the ProcGlobal struct  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Список pgsql-hackers
On 11/02/2026 13:51, Ashutosh Bapat wrote:
> On Wed, Feb 11, 2026 at 8:46 AM Chao Li <li.evan.chao@gmail.com> wrote:
>> I took a quick review. You moved ProcStructLock into PROC_HDR as freeProcsLock, and deleted:
>> ```
>> ProcStructLock = ShmemInitStruct(...);
>> SpinLockInit(ProcStructLock);
>> ```
>>
>> But I don’t see a replacement like SpinLockInit(&ProcGlobal->freeProcsLock);
> 
> Good catch. I think the spinlock needs to be initialized somewhere in
> the code block starting with
> /*
> * Initialize the data structures.
> */
> 
> I also checked many other shared structures which contain spinlocks in
> them. All of them embed the spinlock instead of pointer to the
> spinlock. This change looks inline with that.

Fixed the initialization and pushed. Thanks!

- Heikki




В списке pgsql-hackers по дате отправления: