(errmsg("control file contains invalid data")));
if (ControlFile->state == DB_SHUTDOWNED)
- ereport(LOG,
+ {
+ /* This is the expected case, so don't be chatty in standalone mode */
+ ereport(IsPostmasterEnvironment ? LOG : NOTICE,
(errmsg("database system was shut down at %s",
str_time(ControlFile->time))));
+ }
else if (ControlFile->state == DB_SHUTDOWNED_IN_RECOVERY)
ereport(LOG,
(errmsg("database system was shut down in recovery at %s",
void
ShutdownXLOG(int code, Datum arg)
{
- ereport(LOG,
+ /* Don't be chatty in standalone mode */
+ ereport(IsPostmasterEnvironment ? LOG : NOTICE,
(errmsg("shutting down")));
if (RecoveryInProgress())
ShutdownSUBTRANS();
ShutdownMultiXact();
- ereport(LOG,
+ /* Don't be chatty in standalone mode */
+ ereport(IsPostmasterEnvironment ? LOG : NOTICE,
(errmsg("database system is shut down")));
}
*/
/* Determine whether message is enabled for server log output */
- if (IsPostmasterEnvironment)
- output_to_server = is_log_level_output(elevel, log_min_messages);
- else
- /* In bootstrap/standalone case, do not sort LOG out-of-order */
- output_to_server = (elevel >= log_min_messages);
+ output_to_server = is_log_level_output(elevel, log_min_messages);
/* Determine whether message is enabled for client output */
if (whereToSendOutput == DestRemote && elevel != COMMERROR)