From: Tom Lane <tgl@sss.pgh.pa.us>
To: alvherre <alvherre@commandprompt.com>
Cc: Ray Stell <stellr@cns.vt.edu>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: command tag logging
Date: Thu, 27 May 2010 13:15:25 -0400
Message-ID: <4083.1274980525@sss.pgh.pa.us> (raw)
In-Reply-To: <1274979300-sup-5327@alvh.no-ip.org>
References: <20100526210833.GA14469@cns.vt.edu>
<1274908611-sup-6661@alvh.no-ip.org>
<3713.1274978989@sss.pgh.pa.us>
<1274979300-sup-5327@alvh.no-ip.org>
alvherre <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of jue may 27 12:49:49 -0400 2010:
>> That is in the right place, isn't it. That would suggest that
>> get_ps_display() is returning a wrong length on Ray's machine.
>> It works okay here, but since that's platform-specific code that
>> hardly proves much. Ray, what platform is this exactly?
> FWIW it fails for me too (Debian running Linux 2.6.32).
Hmm. It seems like the %.*s change could only have affected things if
the PS display area contains \0 characters before the theoretical end
of the string. Which it shouldn't, once we've set the display, but
Ray is only reporting this for log_connection output which might come
out before that.
In any case it strikes me that get_ps_display() is designed on the
assumption that it needn't be particularly fast, but using its result
in log_line_prefix is a place in which performance could indeed matter.
Maybe we should go to some effort to track the intended display string
length explicitly so we could avoid the mucking about in
get_ps_display().
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, stellr@cns.vt.edu, pgsql-hackers@postgresql.org
Subject: Re: command tag logging
In-Reply-To: <4083.1274980525@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox