Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-30 Thread Peter Eisentraut
On 9/29/16 10:06 AM, Tom Lane wrote: > Personally I'm also on board with using this for regression testing: > > log_line_prefix = '%t [%p] %q%a ' Committed that way, but with %m instead of %t, as discussed earlier. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-29 Thread Alvaro Herrera
Tom Lane wrote: > Robert Haas writes: > > As long as we get %t and %p in there we're going to be way ahead, really. > > Could we get consensus on just changing the default to > > log_line_prefix = '%t [%p] ' > > and leaving the rest out of it? +1 from me. --

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-29 Thread Tom Lane
Christoph Berg writes: > Re: Tom Lane 2016-09-29 <16946.1475157...@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

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-29 Thread Christoph Berg
Re: Tom Lane 2016-09-29 <16946.1475157...@sss.pgh.pa.us> > Robert Haas writes: > > As long as we get %t and %p in there we're going to be way ahead, really. > > Could we get consensus on just changing the default to > > log_line_prefix = '%t [%p] ' > > and leaving

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-29 Thread Christoph Berg
Re: Peter Eisentraut 2016-09-29 <21d2719f-36ff-06d2-5856-25ed48b96...@2ndquadrant.com> > > Christoph/Debian: > > log_line_prefix = '%t [%p-%l] %q%u@%d ' > > Peter: > > log_line_prefix = '%t [%p]: [%l] %qapp=%a ' > > I'm aware of two existing guidelines on log line formats: syslog and >

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-29 Thread Tom Lane
Robert Haas writes: > As long as we get %t and %p in there we're going to be way ahead, really. Could we get consensus on just changing the default to log_line_prefix = '%t [%p] ' and leaving the rest out of it? I think pretty much everybody agrees that those

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-29 Thread Robert Haas
On Wed, Sep 28, 2016 at 10:30 PM, Peter Eisentraut wrote: > On 9/28/16 6:13 PM, Robert Haas wrote: >> Christoph/Debian: >> log_line_prefix = '%t [%p-%l] %q%u@%d ' >> Peter: >> log_line_prefix = '%t [%p]: [%l] %qapp=%a ' > > I'm aware of two existing

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Tom Lane
Peter Eisentraut writes: > On 9/28/16 6:13 PM, Robert Haas wrote: >> Christoph/Debian: >> log_line_prefix = '%t [%p-%l] %q%u@%d ' >> Peter: >> log_line_prefix = '%t [%p]: [%l] %qapp=%a ' > ... > I don't know why it wants that "-1" there, and I'm actually not

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Peter Eisentraut
On 9/28/16 6:13 PM, Robert Haas wrote: > Christoph/Debian: > log_line_prefix = '%t [%p-%l] %q%u@%d ' > Peter: > log_line_prefix = '%t [%p]: [%l] %qapp=%a ' I'm aware of two existing guidelines on log line formats: syslog and pgbadger. Syslog output looks like this: Sep 28 00:58:56

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Peter Eisentraut
On 9/28/16 6:07 PM, Alvaro Herrera wrote: > Adopting a default prefix is a different question. A default prefix would require different settings for syslog, plain text, and possibly some of the other variants. I'm all in favor of figuring that out, but it needs more work. -- Peter Eisentraut

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Perhaps we should first try to get a consensus on the regression test >> use-case. > I thought Peter's suggestion for regression test drivers was a good one > and I see no reason to block that. Why do you (Tom) object so

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Robert Haas
On Wed, Sep 28, 2016 at 6:07 PM, Alvaro Herrera wrote: > I thought Peter's suggestion for regression test drivers was a good one > and I see no reason to block that. Why do you (Tom) object so strongly > against having a different one on buildfarm than elsewhere? I'd

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Alvaro Herrera
Tom Lane wrote: > Robert Haas writes: > > On Thu, Sep 15, 2016 at 5:18 PM, Robert Haas wrote: > >> On Sat, Aug 27, 2016 at 3:59 PM, Tom Lane wrote: > >>> I think the odds of getting to something that everyone would agree on > >>>

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Tom Lane
Robert Haas writes: > On Thu, Sep 15, 2016 at 5:18 PM, Robert Haas wrote: >> On Sat, Aug 27, 2016 at 3:59 PM, Tom Lane wrote: >>> I think the odds of getting to something that everyone would agree on >>> are nil, so I'm not

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Christoph Berg
Re: Robert Haas 2016-09-28 > > Well, practically anything that includes a PID and the timestamp is > > going to be an improvement over the status quo. Just because we can't > > all agree on what would be perfect does not mean

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-28 Thread Robert Haas
On Thu, Sep 15, 2016 at 5:18 PM, Robert Haas wrote: > On Sat, Aug 27, 2016 at 3:59 PM, Tom Lane wrote: >> Christoph Berg writes: >>> I've always been wondering why we don't set a log_line_prefix by >>> default. >> >> I think the odds

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-09-15 Thread Robert Haas
On Sat, Aug 27, 2016 at 3:59 PM, Tom Lane wrote: > Christoph Berg writes: >> I've always been wondering why we don't set a log_line_prefix by >> default. > > I think the odds of getting to something that everyone would agree on > are nil, so I'm not excited

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-27 Thread Tom Lane
Christoph Berg writes: > I've always been wondering why we don't set a log_line_prefix by > default. I think the odds of getting to something that everyone would agree on are nil, so I'm not excited about getting into that particular bikeshed-painting discussion. Look at the

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-27 Thread Christoph Berg
Re: Fabien COELHO 2016-08-26 > So I would suggest something like the following, which is also a little bit > more compact: > > log_line_prefix = '%m [%p:%l] %q%a ' > > If you want to keep something with %a, maybe parentheses? > > Finally I'm

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-26 Thread Fabien COELHO
Hello Peter, log_line_prefix = '%t [%p]: [%l] %qapp=%a ' which is modeled after the pgfouine recommendation, which is I believe a wide-spread convention, and it also vaguely follows syslog customs. The build farm client has log_line_prefix = '%m [%c:%l] ' which is very similar, but the

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-16 Thread Peter Eisentraut
On 8/16/16 2:23 PM, Peter Eisentraut wrote: > On 8/10/16 9:36 PM, Peter Eisentraut wrote: >> %m vs %t is obviously a minor issue that I will gladly adjust, but >> besides that I prefer to stick with my version. > > Updated patch with %m instead of %t. Will submit to CF. attached -- Peter

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-16 Thread Peter Eisentraut
On 8/10/16 9:36 PM, Peter Eisentraut wrote: > %m vs %t is obviously a minor issue that I will gladly adjust, but > besides that I prefer to stick with my version. Updated patch with %m instead of %t. Will submit to CF. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-10 Thread Peter Eisentraut
On 8/10/16 5:18 PM, Tom Lane wrote: > Or in short: I don't want to be seeing one prefix format in some buildfarm > logs and a different format in others. Sure. My patch has log_line_prefix = '%t [%p]: [%l] %qapp=%a ' which is modeled after the pgfouine recommendation, which is I believe a

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-10 Thread Tom Lane
Peter Eisentraut writes: > On 8/9/16 12:16 PM, Tom Lane wrote: >> Peter Eisentraut writes: >>> Here is a small patch that sets log_line_prefix and application name in >>> pg_regress and the TAP tests, to make analyzing the

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-10 Thread Peter Eisentraut
On 8/9/16 12:16 PM, Tom Lane wrote: > Peter Eisentraut writes: >> > Here is a small patch that sets log_line_prefix and application name in >> > pg_regress and the TAP tests, to make analyzing the server log output >> > easier. > How would this interact with the

Re: [HACKERS] Set log_line_prefix and application name in test drivers

2016-08-09 Thread Tom Lane
Peter Eisentraut writes: > Here is a small patch that sets log_line_prefix and application name in > pg_regress and the TAP tests, to make analyzing the server log output > easier. How would this interact with the buildfarm's existing policies on setting

[HACKERS] Set log_line_prefix and application name in test drivers

2016-08-09 Thread Peter Eisentraut
Here is a small patch that sets log_line_prefix and application name in pg_regress and the TAP tests, to make analyzing the server log output easier. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >From