On Sat, 2007-09-29 at 14:34 -0400, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > Small patch to set ps display during recovery, so we can see the current > > WAL file being processed in both crash and archive recovery. > > Hmm, not right there, because we don't know that the file actually > exists yet. Applied with modifications ...
Double hmmm, that means when we are waiting for file X in pg_standby the ps display will still show "recovering X-1". I'd prefer to set ps before the call to RestoreArchivedFile(), since that is where the wait occurs. I got that wrong myself. Perhaps we could add these lines? Index: src/backend/access/transam/xlog.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/xlog.c,v retrieving revision 1.282 diff -c -r1.282 xlog.c *** src/backend/access/transam/xlog.c 26 Sep 2007 22:36:30 -0000 1.282 --- src/backend/access/transam/xlog.c 30 Sep 2007 07:39:43 -0000 *************** *** 2299,2304 **** --- 2299,2309 ---- if (InArchiveRecovery) { XLogFileName(xlogfname, tli, log, seg); + /* Report recovery progress in PS display */ + strcpy(activitymsg, "restoring "); + XLogFileName(activitymsg + 11, tli, log, seg); + set_ps_display(activitymsg, false); + restoredFromArchive = RestoreArchivedFile(path, xlogfname, "RECOVERYXLOG", XLogSegSize); -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster