|
7 | 7 | * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 |
| - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.386 2010/04/01 00:43:29 rhaas Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.387 2010/04/02 13:10:56 sriggs Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -5557,6 +5557,24 @@ StartupXLOG(void)
|
5557 | 5557 | restartPointCommand ? restartPointCommand : "",
|
5558 | 5558 | sizeof(XLogCtl->restartPointCommand));
|
5559 | 5559 |
|
| 5560 | + if (InArchiveRecovery) |
| 5561 | + { |
| 5562 | + if (StandbyMode) |
| 5563 | + ereport(LOG, |
| 5564 | + (errmsg("entering standby mode"))); |
| 5565 | + else if (recoveryTarget == RECOVERY_TARGET_XID) |
| 5566 | + ereport(LOG, |
| 5567 | + (errmsg("starting point-in-time recovery to XID %u", |
| 5568 | + recoveryTargetXid))); |
| 5569 | + else if (recoveryTarget == RECOVERY_TARGET_TIME) |
| 5570 | + ereport(LOG, |
| 5571 | + (errmsg("starting point-in-time recovery to %s", |
| 5572 | + timestamptz_to_str(recoveryTargetTime)))); |
| 5573 | + else |
| 5574 | + ereport(LOG, |
| 5575 | + (errmsg("starting archive recovery"))); |
| 5576 | + } |
| 5577 | + |
5560 | 5578 | if (read_backup_label(&checkPointLoc))
|
5561 | 5579 | {
|
5562 | 5580 | /*
|
@@ -5694,23 +5712,7 @@ StartupXLOG(void)
|
5694 | 5712 | * backup history file.
|
5695 | 5713 | */
|
5696 | 5714 | if (InArchiveRecovery)
|
5697 |
| - { |
5698 |
| - if (StandbyMode) |
5699 |
| - ereport(LOG, |
5700 |
| - (errmsg("entering standby mode"))); |
5701 |
| - else if (recoveryTarget == RECOVERY_TARGET_XID) |
5702 |
| - ereport(LOG, |
5703 |
| - (errmsg("starting point-in-time recovery to XID %u", |
5704 |
| - recoveryTargetXid))); |
5705 |
| - else if (recoveryTarget == RECOVERY_TARGET_TIME) |
5706 |
| - ereport(LOG, |
5707 |
| - (errmsg("starting point-in-time recovery to %s", |
5708 |
| - timestamptz_to_str(recoveryTargetTime)))); |
5709 |
| - else |
5710 |
| - ereport(LOG, |
5711 |
| - (errmsg("starting archive recovery"))); |
5712 | 5715 | ControlFile->state = DB_IN_ARCHIVE_RECOVERY;
|
5713 |
| - } |
5714 | 5716 | else
|
5715 | 5717 | {
|
5716 | 5718 | ereport(LOG,
|
|
0 commit comments