mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Cleanup items from csvlog changes, per ITAGAKI Takahiro.
This commit is contained in:
parent
bab16af807
commit
ad8fbb549a
@ -18,7 +18,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.38 2007/08/21 01:47:19 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.39 2007/09/20 18:19:08 adunstan Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -352,7 +352,15 @@ SysLoggerMain(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rotation_requested)
|
if (rotation_requested)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Force rotation when both values are zero.
|
||||||
|
* It means the request was sent by pg_rotate_logfile.
|
||||||
|
*/
|
||||||
|
if (!time_based_rotation && size_rotation_for == 0)
|
||||||
|
size_rotation_for = LOG_DESTINATION_STDERR | LOG_DESTINATION_CSVLOG;
|
||||||
logfile_rotate(time_based_rotation, size_rotation_for);
|
logfile_rotate(time_based_rotation, size_rotation_for);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
||||||
@ -1154,7 +1162,7 @@ logfile_rotate(bool time_based_rotation, int size_rotation_for)
|
|||||||
EnterCriticalSection(&sysfileSection);
|
EnterCriticalSection(&sysfileSection);
|
||||||
#endif
|
#endif
|
||||||
fclose(csvlogFile);
|
fclose(csvlogFile);
|
||||||
syslogFile = fh;
|
csvlogFile = fh;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
LeaveCriticalSection(&sysfileSection);
|
LeaveCriticalSection(&sysfileSection);
|
||||||
#endif
|
#endif
|
||||||
|
@ -312,7 +312,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#silent_mode = off # DO NOT USE without syslog or
|
#silent_mode = off # DO NOT USE without syslog or
|
||||||
# redirect_stderr
|
# logging_collector
|
||||||
# (change requires restart)
|
# (change requires restart)
|
||||||
|
|
||||||
# - What to Log -
|
# - What to Log -
|
||||||
|
Loading…
Reference in New Issue
Block a user