|
19 | 19 | *
|
20 | 20 | *
|
21 | 21 | * IDENTIFICATION
|
22 |
| - * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.35 2007/12/12 16:53:14 tgl Exp $ |
| 22 | + * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.36 2007/12/18 00:49:34 tgl Exp $ |
23 | 23 | *
|
24 | 24 | *-------------------------------------------------------------------------
|
25 | 25 | */
|
@@ -414,6 +414,7 @@ pgarch_archiveXlog(char *xlog)
|
414 | 414 | {
|
415 | 415 | char xlogarchcmd[MAXPGPATH];
|
416 | 416 | char pathname[MAXPGPATH];
|
| 417 | + char activitymsg[MAXFNAMELEN + 16]; |
417 | 418 | char *dp;
|
418 | 419 | char *endp;
|
419 | 420 | const char *sp;
|
@@ -471,6 +472,11 @@ pgarch_archiveXlog(char *xlog)
|
471 | 472 | ereport(DEBUG3,
|
472 | 473 | (errmsg_internal("executing archive command \"%s\"",
|
473 | 474 | xlogarchcmd)));
|
| 475 | + |
| 476 | + /* Report archive activity in PS display */ |
| 477 | + snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); |
| 478 | + set_ps_display(activitymsg, false); |
| 479 | + |
474 | 480 | rc = system(xlogarchcmd);
|
475 | 481 | if (rc != 0)
|
476 | 482 | {
|
@@ -527,11 +533,17 @@ pgarch_archiveXlog(char *xlog)
|
527 | 533 | xlogarchcmd)));
|
528 | 534 | }
|
529 | 535 |
|
| 536 | + snprintf(activitymsg, sizeof(activitymsg), "failed on %s", xlog); |
| 537 | + set_ps_display(activitymsg, false); |
| 538 | + |
530 | 539 | return false;
|
531 | 540 | }
|
532 | 541 | ereport(DEBUG1,
|
533 | 542 | (errmsg("archived transaction log file \"%s\"", xlog)));
|
534 | 543 |
|
| 544 | + snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); |
| 545 | + set_ps_display(activitymsg, false); |
| 546 | + |
535 | 547 | return true;
|
536 | 548 | }
|
537 | 549 |
|
|
0 commit comments