From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Ian Lawrence Barwick <barwick(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: 9.3 release notes suggestions |
Date: | 2013-05-05 02:20:37 |
Message-ID: | 20130505022037.GL5631@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, May 4, 2013 at 10:01:18PM -0400, Noah Misch wrote:
> On Sat, May 04, 2013 at 01:17:44PM -0400, Bruce Momjian wrote:
> > On Sun, May 5, 2013 at 01:21:12AM +0900, Ian Lawrence Barwick wrote:
> > > > Well, basically, if you used %c in log_line_prefix, the session id was
> > > > not a fixed length, so your output shifted around based on the pid, see:
> > > >
> > > > http://www.postgresql.org/message-id/20121012185127.GB31038@momjian.us
> > > >
> > > > Always showing four digits seems to give greater consistency to the
> > > > log output.
> > >
> > > Makes sense as long as your PIDs stay below 0x10000, but on OS X it makes
> > > it less consistent IMHO, as you still end up with a varying number of digits:
> > >
> > > 5184ea1f.15ed2 LOG: database system was shut down at 2013-05-04 19:59:41 JST
> > > 5184ea1f.15ed1 LOG: database system is ready to accept connections
> > > 5184ea1f.15ed6 LOG: autovacuum launcher started
> > > 5184ea23.15edb ERROR: column "x" does not exist at character 8
> > > 5184ea23.15edb STATEMENT: select x;
> > > 51852890.0a0a ERROR: column "x" does not exist at character 8
> > > 51852890.0a0a STATEMENT: select x;
> > >
> > > (tested using 9.3 HEAD)
> >
> > OK, that's a serious argument that we should just revert this entire
> > change to do padding of %c. If we can't do it consistently on all
> > patforms, it seems undesirable. What is the Windows max for getpid()?
>
> Not sure about Windows, but the limit on systems using the Linux kernel is
> based on the kernel.pid_max sysctl. That setting defaults to 32768, but I can
> set it as high as 4194304 (2^22) on the system most handy. When I last used
> 32-bit IRIX 6.5, its PIDs seemed to never wrap; a web search suggests it had a
> limit of 2^31. POSIX permits any signed integral type for pid_t. To make %c
> fixed-width, we could check pid_t at build time or unconditionally allow for
> 63-bit PIDs.
OK, so we can either use 4 hex digits minimum and have a fixed with on
most platforms, extend it to 8 hex digits, or revert the entire
fixed-width idea.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-05-05 05:35:25 | Re: 9.3 release notes suggestions |
Previous Message | Noah Misch | 2013-05-05 02:01:18 | Re: 9.3 release notes suggestions |