From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: set_ps_display during recovery |
Date: | 2007-09-30 07:43:47 |
Message-ID: | 1191138227.4174.77.camel@ebony.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On Sat, 2007-09-29 at 14:34 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2007-09-30 11:39:45 | Re: ecpg thead-safe memory management + cleanup |
Previous Message | Petr Jelinek | 2007-09-30 05:00:05 | Re: ALTER TYPE RENAME |