Re: 9.3 release notes suggestions

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.3 release notes suggestions
Date: 2013-05-04 14:55:09
Message-ID: CAB8KJ=jBkif+3+ofGGvn78VDCQX-cbQR5mH2Z9+-caCa5a50Ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/5/4 Bruce Momjian <bruce(at)momjian(dot)us>:
> On Sat, May 4, 2013 at 08:34:18PM +0900, Ian Lawrence Barwick wrote:
>> 2013/4/24 Bruce Momjian <bruce(at)momjian(dot)us>:
>> > Thanks for the many suggestions on improving the 9.3 release notes.
>> > There were many ideas I would have never thought of. Please keep the
>> > suggestions coming.
>>
>> One small suggestion:
>>
>> <listitem>
>> <para>
>> Have <quote>session id</> (<literal>%c</>) in <link
>> linkend="guc-log-line-prefix"><varname>log_line_prefix</></link>
>> always output four hex digits after the period (Bruce Momjian)
>> </para>
>> </listitem>
>>
>> This doesn't sound quite right - on OS X at least, PIDs go up to
>> 99998, which means
>> %c may output 5 hex digits after the period. The following might be
>
> Oh, I was curious if some OS had larger pid values. I am concerned you
> aren't going to get session ids of consistent length on that platform.
>
>> more pedantically
>> accurate:
>>
>> <listitem>
>> <para>
>> Have <quote>session id</> (<literal>%c</>) in <link
>> linkend="guc-log-line-prefix"><varname>log_line_prefix</></link>
>> always pad the PID value with zeros so at least four hex digits are
>> displayed after the period (Bruce Momjian)
>> </para>
>> </listitem>
>
> OK, changed to:
>
> Have <quote>session id</> (<literal>%c</>) in <link
> linkend="guc-log-line-prefix"><varname>log_line_prefix</></link>
> always output at least four hex digits after the period (Bruce Momjian)
>
> This is such a minor change I am trying to keep it short.

Just out of curiosity, what was the reason for the change in the first place?
(Not that it's something I'm particularly passionate about, I just noticed it
when listing changes with potential backwards-compatibilty effects for
the wiki).

>> if my slightly disengaged brain is grokking the source correctly:
>>
>> src/backend/utils/error/elog.c:
>> appendStringInfo(buf, "%lx.%04x", (long) (MyStartTime), MyProcPid);
>
> Yep.

In that case maybe the docs need updating as well?

http://www.postgresql.org/docs/devel/static/runtime-config-logging.html#GUC-LOG-LINE-PREFIX
"The %c escape prints a quasi-unique session identifier, consisting of
two 4-byte hexadecimal numbers (without leading zeros)" separated by a
dot.

Regards

Ian Barwick

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-05-04 15:05:26 Re: 9.3 release notes suggestions
Previous Message Bruce Momjian 2013-05-04 14:45:58 Re: 9.3 release notes suggestions