Re: How to print application_name in log_line_prefix (using %a)? - Mailing list pgsql-general

From Tom Lane
Subject Re: How to print application_name in log_line_prefix (using %a)?
Date
Msg-id 19100.1351526292@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to print application_name in log_line_prefix (using %a)?  (Chris Angelico <rosuav@gmail.com>)
Responses Re: How to print application_name in log_line_prefix (using %a)?  (Jeff Janes <jeff.janes@gmail.com>)
Re: How to print application_name in log_line_prefix (using %a)?  (Tianyin Xu <tixu@cs.ucsd.edu>)
List pgsql-general
Chris Angelico <rosuav@gmail.com> writes:
> On Mon, Oct 29, 2012 at 5:44 PM, Tianyin Xu <tixu@cs.ucsd.edu> wrote:
>> I still wonder why application_name appears in the configuration file if it
>> cannot take effort :-P

> Not sure what you mean by that, but my postgresql.conf doesn't have
> anything about application_name. But if it did, it would be a default
> that an application can override.

The reason background processes don't print anything for %a is that it's
presumed it couldn't possibly be set to anything meaningful.  While in
principle you can set it in the configuration file as a default for
uninformed clients, it's not clear there's a good reason to do that.
Even if you think that's a good idea, we'd still not want background
processes to print it, because then you couldn't tell the difference
between log entries from background processes and those from uninformed
clients.

            regards, tom lane


pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Why BgWriterDelay is fixed?
Next
From: Jeff Janes
Date:
Subject: Re: Access to postgresql query optimizer output