77 * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
10- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.372 2010/02/1207:56:36 heikki Exp $
10+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.373 2010/02/1209:49:08 heikki Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -4882,9 +4882,6 @@ readRecoveryCommandFile(void)
48824882RECOVERY_COMMAND_FILE )));
48834883}
48844884
4885- ereport (LOG ,
4886- (errmsg ("starting archive recovery" )));
4887-
48884885/*
48894886 * Parse the file...
48904887 */
@@ -4927,14 +4924,14 @@ readRecoveryCommandFile(void)
49274924if (strcmp (tok1 ,"restore_command" )== 0 )
49284925{
49294926recoveryRestoreCommand = pstrdup (tok2 );
4930- ereport (LOG ,
4927+ ereport (DEBUG2 ,
49314928(errmsg ("restore_command = '%s'" ,
49324929recoveryRestoreCommand )));
49334930}
49344931else if (strcmp (tok1 ,"recovery_end_command" )== 0 )
49354932{
49364933recoveryEndCommand = pstrdup (tok2 );
4937- ereport (LOG ,
4934+ ereport (DEBUG2 ,
49384935(errmsg ("recovery_end_command = '%s'" ,
49394936recoveryEndCommand )));
49404937}
@@ -4953,10 +4950,10 @@ readRecoveryCommandFile(void)
49534950tok2 )));
49544951}
49554952if (rtli )
4956- ereport (LOG ,
4953+ ereport (DEBUG2 ,
49574954(errmsg ("recovery_target_timeline = %u" ,rtli )));
49584955else
4959- ereport (LOG ,
4956+ ereport (DEBUG2 ,
49604957(errmsg ("recovery_target_timeline = latest" )));
49614958}
49624959else if (strcmp (tok1 ,"recovery_target_xid" )== 0 )
@@ -4967,7 +4964,7 @@ readRecoveryCommandFile(void)
49674964ereport (FATAL ,
49684965 (errmsg ("recovery_target_xid is not a valid number: \"%s\"" ,
49694966tok2 )));
4970- ereport (LOG ,
4967+ ereport (DEBUG2 ,
49714968(errmsg ("recovery_target_xid = %u" ,
49724969recoveryTargetXid )));
49734970recoveryTarget = true;
@@ -4992,7 +4989,7 @@ readRecoveryCommandFile(void)
49924989CStringGetDatum (tok2 ),
49934990ObjectIdGetDatum (InvalidOid ),
49944991Int32GetDatum (-1 )));
4995- ereport (LOG ,
4992+ ereport (DEBUG2 ,
49964993(errmsg ("recovery_target_time = '%s'" ,
49974994timestamptz_to_str (recoveryTargetTime ))));
49984995}
@@ -5005,7 +5002,7 @@ readRecoveryCommandFile(void)
50055002ereport (ERROR ,
50065003(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
50075004errmsg ("parameter \"recovery_target_inclusive\" requires a Boolean value" )));
5008- ereport (LOG ,
5005+ ereport (DEBUG2 ,
50095006(errmsg ("recovery_target_inclusive = %s" ,tok2 )));
50105007}
50115008else if (strcmp (tok1 ,"standby_mode" )== 0 )
@@ -5014,20 +5011,20 @@ readRecoveryCommandFile(void)
50145011ereport (ERROR ,
50155012(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
50165013errmsg ("parameter \"standby_mode\" requires a Boolean value" )));
5017- ereport (LOG ,
5014+ ereport (DEBUG2 ,
50185015(errmsg ("standby_mode = '%s'" ,tok2 )));
50195016}
50205017else if (strcmp (tok1 ,"primary_conninfo" )== 0 )
50215018{
50225019PrimaryConnInfo = pstrdup (tok2 );
5023- ereport (LOG ,
5020+ ereport (DEBUG2 ,
50245021(errmsg ("primary_conninfo = '%s'" ,
50255022PrimaryConnInfo )));
50265023}
50275024else if (strcmp (tok1 ,"trigger_file" )== 0 )
50285025{
50295026TriggerFile = pstrdup (tok2 );
5030- ereport (LOG ,
5027+ ereport (DEBUG2 ,
50315028(errmsg ("trigger_file = '%s'" ,
50325029TriggerFile )));
50335030}
@@ -5649,8 +5646,23 @@ StartupXLOG(void)
56495646 */
56505647if (InArchiveRecovery )
56515648{
5652- ereport (LOG ,
5653- (errmsg ("automatic recovery in progress" )));
5649+ if (StandbyMode )
5650+ ereport (LOG ,
5651+ (errmsg ("entering standby mode" )));
5652+ else if (recoveryTarget )
5653+ {
5654+ if (recoveryTargetExact )
5655+ ereport (LOG ,
5656+ (errmsg ("starting point-in-time recovery to XID %u" ,
5657+ recoveryTargetXid )));
5658+ else
5659+ ereport (LOG ,
5660+ (errmsg ("starting point-in-time recovery to %s" ,
5661+ timestamptz_to_str (recoveryTargetTime ))));
5662+ }
5663+ else
5664+ ereport (LOG ,
5665+ (errmsg ("starting archive recovery" )));
56545666ControlFile -> state = DB_IN_ARCHIVE_RECOVERY ;
56555667}
56565668else
@@ -5718,8 +5730,8 @@ StartupXLOG(void)
57185730
57195731CheckRequiredParameterValues (checkPoint );
57205732
5721- ereport (LOG ,
5722- (errmsg ("initializing recovery connections" )));
5733+ ereport (DEBUG1 ,
5734+ (errmsg ("initializing recovery connections" )));
57235735
57245736InitRecoveryTransactionEnvironment ();
57255737