Re: less log level for success dynamic background workers for 9.5

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: less log level for success dynamic background workers for 9.5
Date: 2015-06-23 17:22:37
Message-ID: CA+TgmoYih9EzhDF63dF8uRQCMjwBk4krBeyw9QR26WUd7RjRuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 23, 2015 at 1:21 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>> Robert Haas wrote:
>>> Well, if the flag is BGWORKER_QUIET, then the default behavior remains
>>> unchanged, but when that flag is used, the log level is reduced to
>>> DEBUG1. That has the advantage of not breaking backward
>>> compatibility. But I'm not sure whether anyone cares if we just break
>>> it, and it's certainly simpler without the flag.
>
>> I vote we do it the other way around, that is have a flag BGWORKER_VERBOSE.
>> This breaks backwards compatibility (I don't think there's too much
>> value in that in this case), but it copes with the more common use case
>> that you want to have the flag while the worker is being developed; and
>> things that are already working don't need to change in order to get the
>> natural behavior.
>
> I concur: if we're to have a flag at all, it should work as Alvaro says.
>
> However, I'm not real sure we need a flag. I think the use-case of
> wanting extra logging for a bgworker under development is unlikely to be
> satisfied very well by just causing existing start/stop logging messages
> to come out at higher priority. You're likely to be wanting to log other,
> bgworker-specific, events, and so you'll probably end up writing a bunch
> of your own elog calls anyway (which you'll eventually remove, #ifdef out,
> or decrease the log levels of).

Yeah. So let's just change it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-06-23 17:33:22 Re: less log level for success dynamic background workers for 9.5
Previous Message Tom Lane 2015-06-23 17:21:44 Re: less log level for success dynamic background workers for 9.5