Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit8556869

Browse files
committed
Fix failure to rotate postmaster log file for size reasons on Windows.
When we eliminated "unnecessary" wakeups of the syslogger process, webroke size-based logfile rotation on Windows, because on that platformdata transfer is done in a separate thread. While non-Windows platformswould recheck the output file size after every log message, Windows onlydid so when the control thread woke up for some other reason, which mightbe quite infrequent. Per bug #7814 from Tsunezumi. Back-patch to 9.2where the problem was introduced.Jeff Janes
1 parentca5db75 commit8556869

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/backend/postmaster/syslogger.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,15 @@ pipeThread(void *arg)
10591059
bytes_in_logbuffer+=bytesRead;
10601060
process_pipe_input(logbuffer,&bytes_in_logbuffer);
10611061
}
1062+
1063+
/*
1064+
* If we've filled the current logfile, nudge the main thread to do a
1065+
* log rotation.
1066+
*/
1067+
if (Log_RotationSize>0&&
1068+
ftell(syslogFile) >=Log_RotationSize*1024L)
1069+
SetLatch(&sysLoggerLatch);
1070+
10621071
LeaveCriticalSection(&sysloggerSection);
10631072
}
10641073

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp