pgsql: Add comment to explain why PGReserveSemaphores() is called early

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add comment to explain why PGReserveSemaphores() is called early
Date: 2025-11-06 12:46:10
Message-ID: E1vGzNS-005IKp-0X@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add comment to explain why PGReserveSemaphores() is called early

Before commit e25626677f, PGReserveSemaphores() had to be called
before SpinlockSemaInit() because spinlocks were implemented using
semaphores on some platforms (--disable-spinlocks). Add a comment
explaining that.

Author: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/CAExHW5seSZpPx-znjidVZNzdagGHOk06F+Ds88MpPUbxd1kTaA@mail.gmail.com
Backpatch-to: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/daf3d99d2b8bebb3361163a11ef3d232002127c9

Modified Files
--------------
src/backend/storage/ipc/ipci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2025-11-06 12:57:48 Re: pgsql: pg_createsubscriber: Fix error complaining about the wrong thing
Previous Message Peter Eisentraut 2025-11-06 09:58:18 pgsql: Fix redundancy in error message