pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Nathan Bossart <nathandbossart@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: reid.thompson@crunchydata.com, Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tristan Partin <tristan@neon.tech>
Subject: Re: Refactoring backend fork+exec code
Date: Mon, 17 Jun 2024 13:36:00 -0500
Message-ID: <ZnCCEN0l3qWv-XpW@nathan> (raw )
In-Reply-To: <CA+hUKG+e-dV7YWBzfBZXsgovgRuX5VmvmOT+v0aXiZJ-EKbXcw@mail.gmail.com >
References: <2136fb4f-1630-43e9-9cf6-b32772b4b0a0@iki.fi >
<20240214213711.2gjlezqll37mg7lg@awork3.anarazel.de >
<CA+Tgmoa=m3qogg1QH8kbicTgCtipgK1hTUDWpHd5SBra7kV6Ew@mail.gmail.com >
<8f695109-8341-4f7c-8b0d-3cadc7eddc9e@iki.fi >
<0c247a78-9dac-4584-8e87-39f2b45bec68@iki.fi >
<861f42c1-01c4-42e6-ab2f-d5743ff69607@iki.fi >
<CZM6WDX5H4QI.NZG1YUCKWLA@neon.tech >
<53a0a952-1b58-4346-941c-6b767108963a@iki.fi >
<47965166-073f-49c8-9e8d-fd6ba37c61fb@iki.fi >
<CA+hUKG+e-dV7YWBzfBZXsgovgRuX5VmvmOT+v0aXiZJ-EKbXcw@mail.gmail.com >
While looking into [0], I noticed that main() still only checks for the
--fork prefix, but IIUC commit aafc05d removed all --fork* options except
for --forkchild. I've attached a patch to strengthen the check in main().
This is definitely just a nitpick.
[0] https://postgr.es/m/CAKAnmmJkZtZAiSryho%3DgYpbvC7H-HNjEDAh16F3SoC9LPu8rqQ%40mail.gmail.com
--
nathan
Attachments:
forkchild_check.patch (text/plain, 556B) download
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index bfd0c5ed65..4672aab837 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -185,7 +185,7 @@ main(int argc, char *argv[])
else if (argc > 1 && strcmp(argv[1], "--boot") == 0)
BootstrapModeMain(argc, argv, false);
#ifdef EXEC_BACKEND
- else if (argc > 1 && strncmp(argv[1], "--fork", 6) == 0)
+ else if (argc > 1 && strncmp(argv[1], "--forkchild", 11) == 0)
SubPostmasterMain(argc, argv);
#endif
else if (argc > 1 && strcmp(argv[1], "--describe-config") == 0)
view thread (50+ messages) latest in thread
Message-ID: <ZnCCEN0l3qWv-XpW@nathan>
Permalink: ../ZnCCEN0l3qWv-XpW@nathan/
Also on: postgresql.org/message-id/ZnCCEN0l3qWv-XpW@nathan
copy link · copy postgr.es · copy git am
reply 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-hackers@postgresql.org
Cc: nathandbossart@gmail.com, thomas.munro@gmail.com, hlinnaka@iki.fi, robertmhaas@gmail.com, andres@anarazel.de, tristan@neon.tech
Subject: Re: Refactoring backend fork+exec code
In-Reply-To: <ZnCCEN0l3qWv-XpW@nathan>
* 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