From bf68b79e50e3359accc85c94fa23cc03abb9350a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 11 Mar 2020 16:36:40 +0100 Subject: 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 Reviewed-by: Kuntal Ghosh Reviewed-by: Alvaro Herrera Discussion: https://www.postgresql.org/message-id/flat/c65e5196-4f04-4ead-9353-6088c19615a3@2ndquadrant.com --- src/backend/access/transam/xlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/access/transam/xlog.c') diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 614a25242b5..4fa446ffa42 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -3648,7 +3648,7 @@ XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli, /* Report recovery progress in PS display */ snprintf(activitymsg, sizeof(activitymsg), "waiting for %s", xlogfname); - set_ps_display(activitymsg, false); + set_ps_display(activitymsg); restoredFromArchive = RestoreArchivedFile(path, xlogfname, "RECOVERYXLOG", @@ -3691,7 +3691,7 @@ XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli, /* Report recovery progress in PS display */ snprintf(activitymsg, sizeof(activitymsg), "recovering %s", xlogfname); - set_ps_display(activitymsg, false); + set_ps_display(activitymsg); /* Track source of data in assorted state variables */ readSource = source; -- cgit v1.2.3