From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Refactor postmaster child process launching |
Date: | 2024-03-18 09:40:36 |
Message-ID: | E1rm9Tv-004QMo-Va@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-03-18 11:12:46 | pgsql: Add some const decorations |
Previous Message | Michael Paquier | 2024-03-18 05:21:48 | pgsql: Remove references to backup_fs_hot() in Cluster.pm |