From: Heikki Linnakangas Date: Thu, 24 Jan 2013 09:41:30 +0000 (+0200) Subject: Also fix rotation of csvlog on Windows. X-Git-Tag: REL9_3_BETA1~446 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=168d315703287989fd9dab0badb212c529e88691;p=postgresql Also fix rotation of csvlog on Windows. Backpatch to 9.2, like the previous fix. --- diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index 534d69ec14..d113011be7 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); }