From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Replace getopt() with our re-entrant variant in the backend
Date: Mon, 30 Mar 2026 17:50:26 +0000
Message-ID: <E1w7Gkr-002BNl-1P@gemulon.postgresql.org> (raw)
Replace getopt() with our re-entrant variant in the backend
Some of these probably could continue using non-re-entrant getopt()
even if we start using threads in the future, but it seems better to
make them all anyway, so that we have a clear-cut rule of "no plain
getopt() in the postgres binary".
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/d1da5f0e-0d68-47c9-a882-eb22f462752f@iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/681774315d738ed9bb213d755c6f39fa5b5009b9
Modified Files
--------------
src/backend/bootstrap/bootstrap.c | 28 +++++++-------
src/backend/postmaster/postmaster.c | 60 +++++++++++++----------------
src/backend/tcop/postgres.c | 77 ++++++++++++++++---------------------
src/backend/utils/misc/ps_status.c | 3 +-
4 files changed, 77 insertions(+), 91 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: Replace getopt() with our re-entrant variant in the backend
In-Reply-To: <E1w7Gkr-002BNl-1P@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