*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.35 2007/12/12 16:53:14 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.36 2007/12/18 00:49:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
char xlogarchcmd[MAXPGPATH];
char pathname[MAXPGPATH];
+ char activitymsg[MAXFNAMELEN + 16];
char *dp;
char *endp;
const char *sp;
ereport(DEBUG3,
(errmsg_internal("executing archive command \"%s\"",
xlogarchcmd)));
+
+ /* Report archive activity in PS display */
+ snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog);
+ set_ps_display(activitymsg, false);
+
rc = system(xlogarchcmd);
if (rc != 0)
{
xlogarchcmd)));
}
+ snprintf(activitymsg, sizeof(activitymsg), "failed on %s", xlog);
+ set_ps_display(activitymsg, false);
+
return false;
}
ereport(DEBUG1,
(errmsg("archived transaction log file \"%s\"", xlog)));
+ snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog);
+ set_ps_display(activitymsg, false);
+
return true;
}