Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 78ACCB5DBC1 for ; Fri, 5 Aug 2011 20:18:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 45718-06 for ; Fri, 5 Aug 2011 23:18:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail149095.authsmtp.com (outmail149095.authsmtp.com [62.13.149.95]) by mail.postgresql.org (Postfix) with ESMTP id B4F0EB5D800 for ; Fri, 5 Aug 2011 20:18:25 -0300 (ADT) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt7.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p75NIMUR092282; Sat, 6 Aug 2011 00:18:22 +0100 (BST) Received: from tornado.leadboat.com (adsl-98-69-163-199.rmo.bellsouth.net [98.69.163.199]) (authenticated bits=128) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p75NIHB9009952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Aug 2011 00:18:20 +0100 (BST) Date: Fri, 5 Aug 2011 19:18:17 -0400 From: Noah Misch To: Tom Lane Cc: pgsql-bugs@postgresql.org, Marc Cousin Subject: Re: BUG #5741: syslog line length Message-ID: <20110805231816.GD419@tornado.leadboat.com> References: <201011021617.oA2GH8L6089397@wwwmaster.postgresql.org> <4DF22887.6020701@gmail.com> <20110805221811.GC419@tornado.leadboat.com> <10392.1312584381@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: <10392.1312584381@sss.pgh.pa.us> User-Agent: Mutt/1.5.18 (2008-05-17) X-Server-Quench: 35de16da-bfb9-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZTSw0a InkCABZdQAk/LxtQ RxQEKB1fPV4VVBxV PwYBb0wLbho1WF4e AWYKWkRUUFdwUWl3 akRYZRtba1RPWQZ0 UUFAXVBXFgB3AFJB ARtgK2EAfgVGcXd1 ZwhjX3ZeWgp5cBIo Q0gARHBUMzVpdWEe BUBFfwMGeR5Kfh1H bFR/BnsFYjBJBC9q VzwZAh8KCH11FQsd CVxScQtACV0aBTo7 SFgGHDMiVUkIQSov L3QA X-Authentic-SMTP: 61633235383639.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/55 X-Sequence-Number: 30867 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 05, 2011 at 06:46:21PM -0400, Tom Lane wrote: > Noah Misch writes: > > A PG_SYSLOG_LIMIT value that loses data to truncation on nearly every default > > GNU/Linux installation makes for a poor default. > > When I changed it, it was on the strength of tests showing that Fedora > 8's default syslogger had a limit of 2KB. A quick check shows this is > still the case in Fedora 15. So I'm not convinced that "nearly every" > is anywhere near true. Point taken. Marc hit the 1024 limit in RHEL 5, which appears to be based on Fedora 6. Perhaps Fedora began to patch in the higher limit in 7 or 8. I also observed the 1024 limit in Ubuntu 8.04 LTS. It is the limit in the latest source distributions of sysklogd, too. > > How about 896? > > But having said that, I could go with 896 (or perhaps 900, which seems > a shade less weird). That works for me. -- Noah Misch http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="syslog-limit-900.patch" *** a/src/backend/utils/error/elog.c --- b/src/backend/utils/error/elog.c *************** *** 105,115 **** int Log_destination = LOG_DESTINATION_STDERR; /* * Max string length to send to syslog(). Note that this doesn't count the * sequence-number prefix we add, and of course it doesn't count the prefix ! * added by syslog itself. On many implementations it seems that the hard ! * limit is approximately 2K bytes including both those prefixes. */ #ifndef PG_SYSLOG_LIMIT ! #define PG_SYSLOG_LIMIT 1024 #endif static bool openlog_done = false; --- 105,115 ---- /* * Max string length to send to syslog(). Note that this doesn't count the * sequence-number prefix we add, and of course it doesn't count the prefix ! * added by syslog itself. Solaris and sysklogd truncate the final message at ! * 1024 bytes, so this value leaves 124 bytes for those prefixes. */ #ifndef PG_SYSLOG_LIMIT ! #define PG_SYSLOG_LIMIT 900 #endif static bool openlog_done = false; --rJwd6BRFiFCcLxzm--