aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/postmaster/syslogger.c10
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);
}