Replace getopt() with our re-entrant variant in the backend
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Author:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-03-30T17:47:16Z
Releases:
19 (unreleased)
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/bootstrap/bootstrap.c | modified | +15 −13 |
| src/backend/postmaster/postmaster.c | modified | +26 −34 |
| src/backend/tcop/postgres.c | modified | +34 −43 |
| src/backend/utils/misc/ps_status.c | modified | +2 −1 |
Discussion
- report on not thread-safe functions 9 messages · 2024-06-06 → 2026-03-30