8000 Also fix rotation of csvlog on Windows. · danielcode/postgres@3cef217 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3cef217

Browse files
committed
Also fix rotation of csvlog on Windows.
Backpatch to 9.2, like the previous fix.
1 parent 14ba9b1 commit 3cef217

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
@@ -1063,10 +1063,12 @@ pipeThread(void *arg)
10631063
* If we've filled the current logfile, nudge the main thread to do a
10641064
* log rotation.
10651065
*/
1066-
if (Log_RotationSize > 0 &&
1067-
ftell(syslogFile) >= Log_RotationSize * 1024L)
1068-
SetLatch(&sysLoggerLatch);
1069-
1066+
if (Log_RotationSize > 0)
1067+
{
1068+
if (ftell(syslogFile) >= Log_RotationSize * 1024L ||
1069+
(csvlogFile != NULL && ftell(csvlogFile) >= Log_RotationSize * 1024L))
1070+
SetLatch(&sysLoggerLatch);
1071+
}
10701072
LeaveCriticalSection(&sysloggerSection);
10711073
}
10721074

0 commit comments

Comments
 (0)
0