aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-09-29 18:32:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-09-29 18:32:56 +0000
commit77ccbe64dd3441a08088fec17b4f68d692150fcf (patch)
treea3fe69ac8dec107828e4619927577bae7ca8657d
parentf6a54b8c42f4900e4c159a8119c096c6ffb7377c (diff)
downloadpostgresql-77ccbe64dd3441a08088fec17b4f68d692150fcf.tar.gz
postgresql-77ccbe64dd3441a08088fec17b4f68d692150fcf.zip
Make recovery show the current input WAL segment name in the startup
process' PS display. After a suggestion by Simon (not exactly his patch though).
-rw-r--r--src/backend/access/transam/xlog.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f258b7f7f04..400bf82be3a 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.283 2007/09/29 01:36:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.284 2007/09/29 18:32:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,7 +48,7 @@
#include "storage/spin.h"
#include "utils/builtins.h"
#include "utils/pg_locale.h"
-
+#include "utils/ps_status.h"
/* File path names (all relative to $PGDATA) */
@@ -2276,6 +2276,7 @@ XLogFileRead(uint32 log, uint32 seg, int emode)
{
char path[MAXPGPATH];
char xlogfname[MAXFNAMELEN];
+ char activitymsg[MAXFNAMELEN + 16];
ListCell *cell;
int fd;
@@ -2311,6 +2312,12 @@ XLogFileRead(uint32 log, uint32 seg, int emode)
{
/* Success! */
curFileTLI = tli;
+
+ /* Report recovery progress in PS display */
+ strcpy(activitymsg, "recovering ");
+ XLogFileName(activitymsg + 11, tli, log, seg);
+ set_ps_display(activitymsg, false);
+
return fd;
}
if (errno != ENOENT) /* unexpected failure? */