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

Commit6b7eebc

Browse files
committed
Increase PG_SYSLOG_LIMIT (the max line length sent to syslog()) from 128 to
1024 to improve performance when sending large elog messages. Also add acomment about why we use that number.Since this represents an externally visible behavior change, and mightpossibly result in portability issues, it seems best not to back-patch it.
1 parent3793310 commit6b7eebc

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*
4343
*
4444
* IDENTIFICATION
45-
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.204 2008/07/08 22:17:41 tgl Exp $
45+
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.205 2008/07/09 15:56:49 tgl Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -85,6 +85,17 @@ char *Log_line_prefix = NULL;/* format for extra log line info */
8585
intLog_destination=LOG_DESTINATION_STDERR;
8686

8787
#ifdefHAVE_SYSLOG
88+
89+
/*
90+
* Max string length to send to syslog(). Note that this doesn't count the
91+
* sequence-number prefix we add, and of course it doesn't count the prefix
92+
* added by syslog itself. On many implementations it seems that the hard
93+
* limit is approximately 2K bytes including both those prefixes.
94+
*/
95+
#ifndefPG_SYSLOG_LIMIT
96+
#definePG_SYSLOG_LIMIT 1024
97+
#endif
98+
8899
staticboolopenlog_done= false;
89100
staticchar*syslog_ident=NULL;
90101
staticintsyslog_facility=LOG_LOCAL0;
@@ -1257,7 +1268,6 @@ DebugFileOpen(void)
12571268
}
12581269

12591270

1260-
12611271
#ifdefHAVE_SYSLOG
12621272

12631273
/*
@@ -1293,10 +1303,6 @@ set_syslog_parameters(const char *ident, int facility)
12931303
}
12941304

12951305

1296-
#ifndefPG_SYSLOG_LIMIT
1297-
#definePG_SYSLOG_LIMIT 128
1298-
#endif
1299-
13001306
/*
13011307
* Write a message line to syslog
13021308
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp