summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorHeikki Linnakangas2024-11-14 14:12:28 +0000
committerHeikki Linnakangas2024-11-14 14:12:28 +0000
commita78af0427015449269fb7d9d8c6057cfcb740149 (patch)
treeeae2ea6af8d455dd8d352d0e38f667ece481bfd5 /src/tools
parentbb861414fea31073f27aaab75a0ceaf3638d7985 (diff)
Assign a child slot to every postmaster child process
Previously, only backends, autovacuum workers, and background workers had an entry in the PMChildFlags array. With this commit, all postmaster child processes, including all the aux processes, have an entry. Dead-end backends still don't get an entry, though, and other processes that don't touch shared memory will never mark their PMChildFlags entry as active. We now maintain separate freelists for different kinds of child processes. That ensures that there are always slots available for autovacuum and background workers. Previously, pre-authentication backends could prevent autovacuum or background workers from starting up, by using up all the slots. The code to manage the slots in the postmaster process is in a new pmchild.c source file. Because postmaster.c is just so large. Assigning pmsignal slot numbers is now pmchild.c's responsibility. This replaces the PMChildInUse array in pmsignal.c. Some of the comments in postmaster.c still talked about the "stats process", but that was removed in commit 5891c7a8ed. Fix those while we're at it. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/a102f15f-eac4-4ff2-af02-f9ff209ec66f@iki.fi
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/pgindent/typedefs.list3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 50bf81de2bc..5fbf0efe832 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -230,7 +230,6 @@ BTWriteState
BUF_MEM
BYTE
BY_HANDLE_FILE_INFORMATION
-Backend
BackendParameters
BackendStartupData
BackendState
@@ -1932,6 +1931,8 @@ PLyTransformToOb
PLyTupleToOb
PLyUnicode_FromStringAndSize_t
PLy_elog_impl_t
+PMChild
+PMChildPool
PMINIDUMP_CALLBACK_INFORMATION
PMINIDUMP_EXCEPTION_INFORMATION
PMINIDUMP_USER_STREAM_INFORMATION