Fix incorrect comment on how BackendStatusArray is indexed
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 17 Jan 2024 13:44:10 +0000 (15:44 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 17 Jan 2024 13:46:05 +0000 (15:46 +0200)
commit28215a32b5154e11574b6e924519b0fb8be4b041
treeed34af0f4e9b2a29c945189b3edff48ffdc9d2d5
parentd8f6ab5f66a3fcce61694308172ffd6c9e04d6b2
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
src/backend/utils/activity/backend_status.c