aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-09-30 17:28:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-09-30 17:28:56 +0000
commitab051bd2938feb8fcbbad6a4c9d97a69d7ec87a6 (patch)
tree83e1778fa6d944ebdab24876a5f8772c85d7d026 /src
parent47d2347167324b0b709033f0845b1e7e7e204c53 (diff)
downloadpostgresql-ab051bd2938feb8fcbbad6a4c9d97a69d7ec87a6.tar.gz
postgresql-ab051bd2938feb8fcbbad6a4c9d97a69d7ec87a6.zip
Adjust recovery PS display as agreed with Simon: 'waiting for XXX'
while the restore_command does its thing, then 'recovering XXX' while processing the segment file. These operations are heavyweight enough that an extra PS display set shouldn't bother anyone.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlog.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 400bf82be3a..7f518e0ba1b 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.284 2007/09/29 18:32:56 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.285 2007/09/30 17:28:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2297,9 +2297,15 @@ XLogFileRead(uint32 log, uint32 seg, int emode)
if (tli < curFileTLI)
break; /* don't bother looking at too-old TLIs */
+ XLogFileName(xlogfname, tli, log, seg);
+
if (InArchiveRecovery)
{
- XLogFileName(xlogfname, tli, log, seg);
+ /* Report recovery progress in PS display */
+ snprintf(activitymsg, sizeof(activitymsg), "waiting for %s",
+ xlogfname);
+ set_ps_display(activitymsg, false);
+
restoredFromArchive = RestoreArchivedFile(path, xlogfname,
"RECOVERYXLOG",
XLogSegSize);
@@ -2314,8 +2320,8 @@ XLogFileRead(uint32 log, uint32 seg, int emode)
curFileTLI = tli;
/* Report recovery progress in PS display */
- strcpy(activitymsg, "recovering ");
- XLogFileName(activitymsg + 11, tli, log, seg);
+ snprintf(activitymsg, sizeof(activitymsg), "recovering %s",
+ xlogfname);
set_ps_display(activitymsg, false);
return fd;