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

Commit14ba9b1

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 parenta79ae0b commit14ba9b1

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
@@ -1058,6 +1058,15 @@ pipeThread(void *arg)
10581058
bytes_in_logbuffer+=bytesRead;
10591059
process_pipe_input(logbuffer,&bytes_in_logbuffer);
10601060
}
1061+
1062+
/*
1063+
* If we've filled the current logfile, nudge the main thread to do a
1064+
* log rotation.
1065+
*/
1066+
if (Log_RotationSize>0&&
1067+
ftell(syslogFile) >=Log_RotationSize*1024L)
1068+
SetLatch(&sysLoggerLatch);
1069+
10611070
LeaveCriticalSection(&sysloggerSection);
10621071
}
10631072

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp