Small patch to set ps display during recovery, so we can see the current
WAL file being processed in both crash and archive recovery.
Very simple patch, but useful. Tested.
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com
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 29 Sep 2007 07:51:20 -0000
***************
*** 48,53 ****
--- 48,54 ----
#include "storage/spin.h"
#include "utils/builtins.h"
#include "utils/pg_locale.h"
+ #include "utils/ps_status.h"
***************
*** 2296,2310 ****
if (tli < curFileTLI)
break; /* don't bother looking at too-old TLIs */
if (InArchiveRecovery)
- {
- XLogFileName(xlogfname, tli, log, seg);
restoredFromArchive = RestoreArchivedFile(path, xlogfname,
"RECOVERYXLOG",
XLogSegSize);
- }
else
XLogFilePath(path, tli, log, seg);
fd = BasicOpenFile(path, O_RDONLY | PG_BINARY, 0);
if (fd >= 0)
--- 2297,2310 ----
if (tli < curFileTLI)
break; /* don't bother looking at too-old TLIs */
+ XLogFileName(xlogfname, tli, log, seg);
if (InArchiveRecovery)
restoredFromArchive = RestoreArchivedFile(path, xlogfname,
"RECOVERYXLOG",
XLogSegSize);
else
XLogFilePath(path, tli, log, seg);
+ set_ps_display(xlogfname, false);
fd = BasicOpenFile(path, O_RDONLY | PG_BINARY, 0);
if (fd >= 0)
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend