diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-01-24 11:41:30 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-01-24 11:41:30 +0200 |
commit | 168d315703287989fd9dab0badb212c529e88691 (patch) | |
tree | 1a43de0fa40f4c24986a66e68075c092bd56b346 /src | |
parent | f64315c6e67e8f37e61bdbd5cb27248f2f6050da (diff) | |
download | postgresql-168d315703287989fd9dab0badb212c529e88691.tar.gz postgresql-168d315703287989fd9dab0badb212c529e88691.zip |
Also fix rotation of csvlog on Windows.
Backpatch to 9.2, like the previous fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/syslogger.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index 534d69ec140..d113011be7c 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -1064,10 +1064,12 @@ pipeThread(void *arg) * If we've filled the current logfile, nudge the main thread to do a * log rotation. */ - if (Log_RotationSize > 0 && - ftell(syslogFile) >= Log_RotationSize * 1024L) - SetLatch(&sysLoggerLatch); - + if (Log_RotationSize > 0) + { + if (ftell(syslogFile) >= Log_RotationSize * 1024L || + (csvlogFile != NULL && ftell(csvlogFile) >= Log_RotationSize * 1024L)) + SetLatch(&sysLoggerLatch); + } LeaveCriticalSection(&sysloggerSection); } |