Skip to content

Commit 168d315

Browse files
committed
Also fix rotation of csvlog on Windows.
Backpatch to 9.2, like the previous fix.
1 parent f64315c commit 168d315

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/backend/postmaster/syslogger.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,10 +1064,12 @@ pipeThread(void *arg)
10641064
* If we've filled the current logfile, nudge the main thread to do a
10651065
* log rotation.
10661066
*/
1067-
if (Log_RotationSize > 0 &&
1068-
ftell(syslogFile) >= Log_RotationSize * 1024L)
1069-
SetLatch(&sysLoggerLatch);
1070-
1067+
if (Log_RotationSize > 0)
1068+
{
1069+
if (ftell(syslogFile) >= Log_RotationSize * 1024L ||
1070+
(csvlogFile != NULL && ftell(csvlogFile) >= Log_RotationSize * 1024L))
1071+
SetLatch(&sysLoggerLatch);
1072+
}
10711073
LeaveCriticalSection(&sysloggerSection);
10721074
}
10731075

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy