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.372 2010/02/12 07:56:36 heikki Exp $
10
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.373 2010/02/12 09:49:08 heikki Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -4882,9 +4882,6 @@ readRecoveryCommandFile(void)
4882
4882
RECOVERY_COMMAND_FILE )));
4883
4883
}
4884
4884
4885
- ereport (LOG ,
4886
- (errmsg ("starting archive recovery" )));
4887
-
4888
4885
/*
4889
4886
* Parse the file...
4890
4887
*/
@@ -4927,14 +4924,14 @@ readRecoveryCommandFile(void)
4927
4924
if (strcmp (tok1 , "restore_command" ) == 0 )
4928
4925
{
4929
4926
recoveryRestoreCommand = pstrdup (tok2 );
4930
- ereport (LOG ,
4927
+ ereport (DEBUG2 ,
4931
4928
(errmsg ("restore_command = '%s'" ,
4932
4929
recoveryRestoreCommand )));
4933
4930
}
4934
4931
else if (strcmp (tok1 , "recovery_end_command" ) == 0 )
4935
4932
{
4936
4933
recoveryEndCommand = pstrdup (tok2 );
4937
- ereport (LOG ,
4934
+ ereport (DEBUG2 ,
4938
4935
(errmsg ("recovery_end_command = '%s'" ,
4939
4936
recoveryEndCommand )));
4940
4937
}
@@ -4953,10 +4950,10 @@ readRecoveryCommandFile(void)
4953
4950
tok2 )));
4954
4951
}
4955
4952
if (rtli )
4956
- ereport (LOG ,
4953
+ ereport (DEBUG2 ,
4957
4954
(errmsg ("recovery_target_timeline = %u" , rtli )));
4958
4955
else
4959
- ereport (LOG ,
4956
+ ereport (DEBUG2 ,
4960
4957
(errmsg ("recovery_target_timeline = latest" )));
4961
4958
}
4962
4959
else if (strcmp (tok1 , "recovery_target_xid" ) == 0 )
@@ -4967,7 +4964,7 @@ readRecoveryCommandFile(void)
4967
4964
ereport (FATAL ,
4968
4965
(errmsg ("recovery_target_xid is not a valid number: \"%s\"" ,
4969
4966
tok2 )));
4970
- ereport (LOG ,
4967
+ ereport (DEBUG2 ,
4971
4968
(errmsg ("recovery_target_xid = %u" ,
4972
4969
recoveryTargetXid )));
4973
4970
recoveryTarget = true;
@@ -4992,7 +4989,7 @@ readRecoveryCommandFile(void)
4992
4989
CStringGetDatum (tok2 ),
4993
4990
ObjectIdGetDatum (InvalidOid ),
4994
4991
Int32GetDatum (-1 )));
4995
- ereport (LOG ,
4992
+ ereport (DEBUG2 ,
4996
4993
(errmsg ("recovery_target_time = '%s'" ,
4997
4994
timestamptz_to_str (recoveryTargetTime ))));
4998
4995
}
@@ -5005,7 +5002,7 @@ readRecoveryCommandFile(void)
5005
5002
ereport (ERROR ,
5006
5003
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
5007
5004
errmsg ("parameter \"recovery_target_inclusive\" requires a Boolean value" )));
5008
- ereport (LOG ,
5005
+ ereport (DEBUG2 ,
5009
5006
(errmsg ("recovery_target_inclusive = %s" , tok2 )));
5010
5007
}
5011
5008
else if (strcmp (tok1 , "standby_mode" ) == 0 )
@@ -5014,20 +5011,20 @@ readRecoveryCommandFile(void)
5014
5011
ereport (ERROR ,
5015
5012
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
5016
5013
errmsg ("parameter \"standby_mode\" requires a Boolean value" )));
5017
- ereport (LOG ,
5014
+ ereport (DEBUG2 ,
5018
5015
(errmsg ("standby_mode = '%s'" , tok2 )));
5019
5016
}
5020
5017
else if (strcmp (tok1 , "primary_conninfo" ) == 0 )
5021
5018
{
5022
5019
PrimaryConnInfo = pstrdup (tok2 );
5023
- ereport (LOG ,
5020
+ ereport (DEBUG2 ,
5024
5021
(errmsg ("primary_conninfo = '%s'" ,
5025
5022
PrimaryConnInfo )));
5026
5023
}
5027
5024
else if (strcmp (tok1 , "trigger_file" ) == 0 )
5028
5025
{
5029
5026
TriggerFile = pstrdup (tok2 );
5030
- ereport (LOG ,
5027
+ ereport (DEBUG2 ,
5031
5028
(errmsg ("trigger_file = '%s'" ,
5032
5029
TriggerFile )));
5033
5030
}
@@ -5649,8 +5646,23 @@ StartupXLOG(void)
5649
5646
*/
5650
5647
if (InArchiveRecovery )
5651
5648
{
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" )));
5654
5666
ControlFile -> state = DB_IN_ARCHIVE_RECOVERY ;
5655
5667
}
5656
5668
else
@@ -5718,8 +5730,8 @@ StartupXLOG(void)
5718
5730
5719
5731
CheckRequiredParameterValues (checkPoint );
5720
5732
5721
- ereport (LOG ,
5722
- (errmsg ("initializing recovery connections" )));
5733
+ ereport (DEBUG1 ,
5734
+ (errmsg ("initializing recovery connections" )));
5723
5735
5724
5736
InitRecoveryTransactionEnvironment ();
5725
5737
0 commit comments