From 507f89a83ad6ac005d67028438aa741f6d62a3ce Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Thu, 17 Jul 2025 11:58:43 -0300 Subject: [PATCH 3/4] fixup! Create a separate file listing backend types --- src/backend/postmaster/launch_backend.c | 2 +- src/backend/utils/init/miscinit.c | 2 +- .../postmaster/{proctype_list.h => proctypelist.h} | 12 +++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) rename src/include/postmaster/{proctype_list.h => proctypelist.h} (84%) diff --git a/src/backend/postmaster/launch_backend.c b/src/backend/postmaster/launch_backend.c index d8ac514bbbc..8b2f1a0cf41 100644 --- a/src/backend/postmaster/launch_backend.c +++ b/src/backend/postmaster/launch_backend.c @@ -179,7 +179,7 @@ typedef struct static child_process_kind child_process_kinds[] = { #define PG_PROCTYPE(bktype, description, main_func, shmem_attach) \ [bktype] = {description, main_func, shmem_attach}, -#include "postmaster/proctype_list.h" +#include "postmaster/proctypelist.h" #undef PG_PROCTYPE }; diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 53a232cee41..dec220a61f5 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -268,7 +268,7 @@ GetBackendTypeDesc(BackendType backendType) { #define PG_PROCTYPE(bktype, description, main_func, shmem_attach) \ case bktype: backendDesc = gettext_noop(description); break; -#include "postmaster/proctype_list.h" +#include "postmaster/proctypelist.h" #undef PG_PROCTYPE } return backendDesc; diff --git a/src/include/postmaster/proctype_list.h b/src/include/postmaster/proctypelist.h similarity index 84% rename from src/include/postmaster/proctype_list.h rename to src/include/postmaster/proctypelist.h index 749a6db8364..2626e7a5ac5 100644 --- a/src/include/postmaster/proctype_list.h +++ b/src/include/postmaster/proctypelist.h @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * proctype_list.h + * proctypelist.h * * The list of process types is kept on its own source file for use by * automatic tools. The exact representation of a process type is @@ -11,12 +11,18 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * src/include/postmaster/proctype_list.h + * src/include/postmaster/proctypelist.h * *------------------------------------------------------------------------- */ -/* there is deliberately not an #ifndef PROCTYPE_LIST_H here */ +/* there is deliberately not an #ifndef PROCTYPELIST_H here */ + +/* + * WAL senders start their life as regular backend processes, and change their + * type after authenticating the client for replication. We list it here for + * PostmasterChildName() but cannot launch them directly. + */ /* * List of process types (symbol, description, Main function, shmem_attach) -- 2.39.5