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

Commit375aa7b

Browse files
committed
Reduce PG_SYSLOG_LIMIT to 900 bytes.
The previous limit of 1024 was set on the assumption that all modern syslogimplementations have line length limits of 2KB or so. However, this isfalse, as at least Solaris and sysklogd truncate at only 1KB. 900 seemsto leave enough room for the max likely length of the tacked-on prefixes,so let's go with that.As with the previous change, it doesn't seem wise to back-patch this intoalready-released branches; but it should be OK to sneak it into 9.1.Noah Misch
1 parentc4096c7 commit375aa7b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/backend/utils/error/elog.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,12 @@ intLog_destination = LOG_DESTINATION_STDERR;
105105
/*
106106
* Max string length to send to syslog(). Note that this doesn't count the
107107
* sequence-number prefix we add, and of course it doesn't count the prefix
108-
* added by syslog itself.On many implementations it seems that the hard
109-
* limit is approximately 2K bytes including both those prefixes.
108+
* added by syslog itself. Solaris and sysklogd truncate the final message
109+
* at 1024 bytes, so this value leaves 124 bytes for those prefixes. (Most
110+
* other syslog implementations seem to have limits of 2KB or so.)
110111
*/
111112
#ifndefPG_SYSLOG_LIMIT
112-
#definePG_SYSLOG_LIMIT1024
113+
#definePG_SYSLOG_LIMIT900
113114
#endif
114115

115116
staticboolopenlog_done= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp