1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00

Also fix rotation of csvlog on Windows.

Backpatch to 9.2, like the previous fix.
This commit is contained in:
Heikki Linnakangas 2013-01-24 11:41:30 +02:00
parent f64315c6e6
commit 168d315703

View File

@ -1064,10 +1064,12 @@ pipeThread(void *arg)
* If we've filled the current logfile, nudge the main thread to do a * If we've filled the current logfile, nudge the main thread to do a
* log rotation. * log rotation.
*/ */
if (Log_RotationSize > 0 && if (Log_RotationSize > 0)
ftell(syslogFile) >= Log_RotationSize * 1024L) {
SetLatch(&sysLoggerLatch); if (ftell(syslogFile) >= Log_RotationSize * 1024L ||
(csvlogFile != NULL && ftell(csvlogFile) >= Log_RotationSize * 1024L))
SetLatch(&sysLoggerLatch);
}
LeaveCriticalSection(&sysloggerSection); LeaveCriticalSection(&sysloggerSection);
} }