Re: Set log_line_prefix and application name in test drivers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Set log_line_prefix and application name in test drivers
Date
Msg-id 18642.1475159736@sss.pgh.pa.us
Whole thread Raw
In response to Re: Set log_line_prefix and application name in test drivers  (Christoph Berg <myon@debian.org>)
Responses Non-empty default log_line_prefix  (Christoph Berg <myon@debian.org>)
List pgsql-hackers
Christoph Berg <myon@debian.org> writes:
> Re: Tom Lane 2016-09-29 <16946.1475157978@sss.pgh.pa.us>
>> Personally I'm also on board with using this for regression testing:
>> log_line_prefix = '%t [%p] %q%a '
>> but I doubt it can be sold as a general-purpose default.

> I don't think it makes much sense to log only %a unconditionally,

Right; this is helpful for the regression tests, now that Peter has set
up pg_regress to set the application name, but I can't see trying to
push it on the rest of the world.

> Possibly the longer version could be added as an example in the
> documentation.

I suspect that simply having a nonempty default in the first place
is going to do more to raise peoples' awareness than anything we
could do in the documentation.  But perhaps an example along these
lines would be useful for showing proper use of %q.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Speed up Clog Access by increasing CLOG buffers
Next
From: Tom Lane
Date:
Subject: Re: Bug in to_timestamp().