pgsql: Fix incorrect comment on how BackendStatusArray is indexed

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix incorrect comment on how BackendStatusArray is indexed
Date: 2024-01-17 13:57:36
Message-ID: E1rQ6QC-001r5T-OT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix incorrect comment on how BackendStatusArray is indexed

The comment was copy-pasted from the call to ProcSignalInit() in
AuxiliaryProcessMain(), which uses a similar scheme of having reserved
slots for aux processes after MaxBackends slots for backends. However,
ProcSignalInit() indexing starts from 1, whereas BackendStatusArray
starts from 0. The code is correct, but the comment was wrong.

Discussion: https://www.postgresql.org/message-id/f3ecd4cb-85ee-4e54-8278-5fabfb3a4ed0@iki.fi
Backpatch-through: v14

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/90ccc9bf90a917037f9cd451ce4c10fb9704924e

Modified Files
--------------
src/backend/utils/activity/backend_status.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2024-01-17 21:07:30 pgsql: Fix spelling in notice
Previous Message Daniel Gustafsson 2024-01-17 10:35:32 pgsql: Close socket in case of errors in setting non-blocking