From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor postmaster child process launching
Date: Mon, 18 Mar 2024 09:40:36 +0000
Message-ID: <E1rm9Tv-004QMo-Va@gemulon.postgresql.org> (raw)
Refactor postmaster child process launching
Introduce new postmaster_child_launch() function that deals with the
differences in EXEC_BACKEND mode.
Refactor the mechanism of passing information from the parent to child
process. Instead of using different command-line arguments when
launching the child process in EXEC_BACKEND mode, pass a
variable-length blob of startup data along with all the global
variables. The contents of that blob depend on the kind of child
process being launched. In !EXEC_BACKEND mode, we use the same blob,
but it's simply inherited from the parent to child process.
Reviewed-by: Tristan Partin, Andres Freund
Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/aafc05de1bf5c0324cb5e690c6742118c1ac4af6
Modified Files
--------------
src/backend/postmaster/autovacuum.c | 153 +-------
src/backend/postmaster/auxprocess.c | 53 +--
src/backend/postmaster/bgworker.c | 20 +-
src/backend/postmaster/bgwriter.c | 8 +-
src/backend/postmaster/checkpointer.c | 8 +-
src/backend/postmaster/launch_backend.c | 432 +++++++++++++++++------
src/backend/postmaster/pgarch.c | 8 +-
src/backend/postmaster/postmaster.c | 517 +++++-----------------------
src/backend/postmaster/startup.c | 8 +-
src/backend/postmaster/syslogger.c | 280 +++++++--------
src/backend/postmaster/walsummarizer.c | 8 +-
src/backend/postmaster/walwriter.c | 8 +-
src/backend/replication/logical/slotsync.c | 72 +---
src/backend/replication/walreceiver.c | 8 +-
src/backend/utils/init/globals.c | 1 +
src/include/postmaster/autovacuum.h | 10 +-
src/include/postmaster/auxprocess.h | 4 +-
src/include/postmaster/bgworker_internals.h | 2 +-
src/include/postmaster/bgwriter.h | 4 +-
src/include/postmaster/pgarch.h | 2 +-
src/include/postmaster/postmaster.h | 18 +-
src/include/postmaster/startup.h | 2 +-
src/include/postmaster/syslogger.h | 4 +-
src/include/postmaster/walsummarizer.h | 2 +-
src/include/postmaster/walwriter.h | 2 +-
src/include/replication/slotsync.h | 4 +-
src/include/replication/walreceiver.h | 2 +-
src/tools/pgindent/typedefs.list | 4 +
28 files changed, 656 insertions(+), 988 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor postmaster child process launching
In-Reply-To: <E1rm9Tv-004QMo-Va@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox