Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b53a46

Browse files
committed
Fix incorrect comment on how BackendStatusArray is indexed
The comment was copy-pasted from the call to ProcSignalInit() inAuxiliaryProcessMain(), which uses a similar scheme of having reservedslots for aux processes after MaxBackends slots for backends. However,ProcSignalInit() indexing starts from 1, whereas BackendStatusArraystarts from 0. The code is correct, but the comment was wrong.Discussion:https://www.postgresql.org/message-id/f3ecd4cb-85ee-4e54-8278-5fabfb3a4ed0@iki.fiBackpatch-through: v14
1 parent7cfa154 commit2b53a46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/utils/activity/backend_status.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ pgstat_beinit(void)
263263
* Assign the MyBEEntry for an auxiliary process. Since it doesn't
264264
* have a BackendId, the slot is statically allocated based on the
265265
* auxiliary process type (MyAuxProcType). Backends use slots indexed
266-
* in the range from1 to MaxBackends (inclusive), so we use
267-
* MaxBackends +AuxBackendType + 1as the index of the slot for an
268-
*auxiliaryprocess.
266+
* in the range from0 to MaxBackends (exclusive), so we use
267+
* MaxBackends +AuxProcTypeas the index of the slot for an auxiliary
268+
* process.
269269
*/
270270
MyBEEntry=&BackendStatusArray[MaxBackends+MyAuxProcType];
271271
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp