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:
parent
f64315c6e6
commit
168d315703
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user