diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index 5cb44d6..8fc4531 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -351,9 +351,8 @@ SysLoggerMain(int argc, char *argv[]) } /* - * Force rewriting last log filename when reloading configuration, - * log_destination and logging_collector may have been changed. Do - * it right now to not wait for the next file rotation. + * log_destination and logging_collector may have changed; rewrite + * current log filename. */ logfile_writename(last_file_name, last_csv_file_name); } @@ -522,9 +521,8 @@ SysLogger_Start(void) char *filename; if (!Logging_collector) { - /* If logging collector is not enabled, remove current log - * filename as we don't know where messages are logged and - * information contained in this file are obsolete. + /* Logging collector is not enabled. We don't know where messages are + * logged. Remove outdated file holding the current log filenames. */ unlink(CURRENT_LOG_FILENAME); return 0; @@ -1388,10 +1386,10 @@ sigUsr1Handler(SIGNAL_ARGS) } /* - * Store the name of the files where current log messages are written when - * log collector is enabled. Useful to find the name of the current log file - * when a time-based rotation is defined. Filenames are first stored into a - * temporary file and renamed into the final destination. + * Store the name of the file(s) where the log collector, when enabled, writes + * log messages. Useful for finding the name(s) of the current log file(s) + * when there is time-based logfile rotation. Filenames are stored in a + * temporary file and renamed into the final destination for atomicity. */ static void logfile_writename(char *filename, char *csvfilename)