Thread: local_preload_libraries logspam

local_preload_libraries logspam

From
Peter Geoghegan
Date:
It seems like an oversight to me that local_preload_libraries causes a
new log message to appear each time a new connection is established.

Is there any sympathy for the view that we should have a way of
turning this off, or simply not log such messages? We could still have
it appear at DEBUG2 level, as sometimes happens in the EXEC_BACKEND
case (granted, this is just so that there is behavior equivalent to
the !EXEC_BACKEND case for shared_preload_libraries).

-- 
Peter Geoghegan



Re: local_preload_libraries logspam

From
Peter Eisentraut
Date:
On Tue, 2013-05-07 at 14:28 -0700, Peter Geoghegan wrote:
> It seems like an oversight to me that local_preload_libraries causes a
> new log message to appear each time a new connection is established.

It is correct in my view (but perhaps I have just gotten used to it),
but I wouldn't mind if you wanted to make an informed change.




Re: local_preload_libraries logspam

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> On Tue, 2013-05-07 at 14:28 -0700, Peter Geoghegan wrote:
>> It seems like an oversight to me that local_preload_libraries causes a
>> new log message to appear each time a new connection is established.

> It is correct in my view (but perhaps I have just gotten used to it),
> but I wouldn't mind if you wanted to make an informed change.

It seems reasonable to me to reduce it to DEBUG1 level.  In most
use-cases, that message will appear on every backend start, rendering
its usefulness debatable.  Peter's characterization as "log spam" might
be excessive, but probably not by much.

On the other hand, if we have it as DEBUG2 in the EXEC_BACKEND code
path, I would be willing to argue that that's too low.  If you're
starting to feel a need to inquire into the backend's behavior, knowing
about loaded modules seems like one of the first things you need to know
about.  Hence, I'd vote for DEBUG1.
        regards, tom lane



Re: local_preload_libraries logspam

From
Peter Geoghegan
Date:
On Tue, May 7, 2013 at 7:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> On the other hand, if we have it as DEBUG2 in the EXEC_BACKEND code
> path, I would be willing to argue that that's too low.  If you're
> starting to feel a need to inquire into the backend's behavior, knowing
> about loaded modules seems like one of the first things you need to know
> about.  Hence, I'd vote for DEBUG1.

+1 to DEBUG1.


-- 
Peter Geoghegan



Re: local_preload_libraries logspam

From
Peter Geoghegan
Date:
On Tue, May 7, 2013 at 7:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> It seems reasonable to me to reduce it to DEBUG1 level.

Attached patch renders all "loaded library..." messages DEBUG1,
regardless of whether local_preload_libraries or
shared_preload_libraries is involved, and regardless of EXEC_BACKEND.

--
Peter Geoghegan

Attachment

Re: local_preload_libraries logspam

From
Peter Geoghegan
Date:
On Mon, May 13, 2013 at 3:22 PM, Peter Geoghegan <pg@heroku.com> wrote:
> Attached patch renders all "loaded library..." messages DEBUG1,
> regardless of whether local_preload_libraries or
> shared_preload_libraries is involved, and regardless of EXEC_BACKEND.

Can someone take a look at this, please? I'd rather like to see this
issue fixed.


-- 
Peter Geoghegan



Re: local_preload_libraries logspam

From
Peter Eisentraut
Date:
On 6/3/13 8:19 PM, Peter Geoghegan wrote:
> On Mon, May 13, 2013 at 3:22 PM, Peter Geoghegan <pg@heroku.com> wrote:
>> Attached patch renders all "loaded library..." messages DEBUG1,
>> regardless of whether local_preload_libraries or
>> shared_preload_libraries is involved, and regardless of EXEC_BACKEND.
> 
> Can someone take a look at this, please? I'd rather like to see this
> issue fixed.

I wasn't considering this for 9.3.





Re: local_preload_libraries logspam

From
Andres Freund
Date:
On 2013-06-04 08:39:18 -0400, Peter Eisentraut wrote:
> On 6/3/13 8:19 PM, Peter Geoghegan wrote:
> > On Mon, May 13, 2013 at 3:22 PM, Peter Geoghegan <pg@heroku.com> wrote:
> >> Attached patch renders all "loaded library..." messages DEBUG1,
> >> regardless of whether local_preload_libraries or
> >> shared_preload_libraries is involved, and regardless of EXEC_BACKEND.
> > 
> > Can someone take a look at this, please? I'd rather like to see this
> > issue fixed.
> 
> I wasn't considering this for 9.3.

I don't really see a point in delaying it towards 9.4. The change itself
is trivial, doesn't change behaviour users can rely on directly. So
what's to be gained by waiting?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



Re: local_preload_libraries logspam

From
Peter Geoghegan
Date:
On Tue, Jun 4, 2013 at 5:46 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> I don't really see a point in delaying it towards 9.4.

Me neither, obviously. It's not as if someone was willing to speak in
defense of the current behavior.


-- 
Peter Geoghegan



Re: local_preload_libraries logspam

From
Jeff Davis
Date:
On Mon, 2013-05-13 at 15:22 -0700, Peter Geoghegan wrote:
> On Tue, May 7, 2013 at 7:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > It seems reasonable to me to reduce it to DEBUG1 level.
> 
> Attached patch renders all "loaded library..." messages DEBUG1,
> regardless of whether local_preload_libraries or
> shared_preload_libraries is involved, and regardless of EXEC_BACKEND.

This looks quite trivial and seems to match the discussed behavior.

It's marked as "Waiting on Review", but it looks more like it's in need
of a committer. I'll do a quick review and commit this in a couple hours
unless someone objects.

Regards,Jeff Davis