From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor ps_status.c API
Date: Wed, 11 Mar 2020 15:44:28 +0000
Message-ID: <E1jC3X2-0000Fl-2I@gemulon.postgresql.org> (raw)
Refactor ps_status.c API
The init_ps_display() arguments were mostly lies by now, so to match
typical usage, just use one argument and let the caller assemble it
from multiple sources if necessary. The only user of the additional
arguments is BackendInitialize(), which was already doing string
assembly on the caller side anyway.
Remove the second argument of set_ps_display() ("force") and just
handle that in init_ps_display() internally.
BackendInitialize() also used to set the initial status as
"authentication", but that was very far from where authentication
actually happened. So now it's set to "initializing" and then
"authentication" just before the actual call to
ClientAuthentication().
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/c65e5196-4f04-4ead-9353-6088c19615a3@2ndquadrant.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bf68b79e50e3359accc85c94fa23cc03abb9350a
Modified Files
--------------
src/backend/access/transam/xlog.c | 4 ++--
src/backend/bootstrap/bootstrap.c | 2 +-
src/backend/commands/async.c | 4 ++--
src/backend/postmaster/autovacuum.c | 6 +++---
src/backend/postmaster/bgworker.c | 2 +-
src/backend/postmaster/pgarch.c | 8 ++++----
src/backend/postmaster/pgstat.c | 2 +-
src/backend/postmaster/postmaster.c | 32 ++++++++++++++------------------
src/backend/postmaster/syslogger.c | 2 +-
src/backend/replication/basebackup.c | 2 +-
src/backend/replication/syncrep.c | 4 ++--
src/backend/replication/walreceiver.c | 7 +++----
src/backend/replication/walsender.c | 2 +-
src/backend/storage/ipc/standby.c | 4 ++--
src/backend/storage/lmgr/lock.c | 6 +++---
src/backend/tcop/postgres.c | 16 ++++++++--------
src/backend/utils/init/postinit.c | 3 ++-
src/backend/utils/misc/ps_status.c | 31 ++++++++++++++++++-------------
src/include/utils/ps_status.h | 5 ++---
19 files changed, 71 insertions(+), 71 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Refactor ps_status.c API
In-Reply-To: <E1jC3X2-0000Fl-2I@gemulon.postgresql.org>
References: <E1jC3X2-0000Fl-2I@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