Re: local_preload_libraries logspam

Lists: pgsql-hackers
From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: local_preload_libraries logspam
Date: 2013-05-07 21:28:11
Message-ID: CAM3SWZR+cDi0LN5VtkrzkXxiu8yHQDg1RGm8Mku8gRdgT_JFsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-05-08 01:07:05
Message-ID: 1367975225.5136.1.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-05-08 02:01:10
Message-ID: 9565.1367978470@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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


From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-05-08 03:25:32
Message-ID: CAM3SWZSCcfxPETw-YftTd9tmwceSrZPMaD0ngvSgmKsXfgxnKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, May 7, 2013 at 7:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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


From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-05-13 22:22:09
Message-ID: CAM3SWZTTcoN7OpwS1Fe3K9SuiTErT+oWbS7u4TMr5+1suD2aNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, May 7, 2013 at 7:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 Content-Type Size
load_level.2013_05_13.patch application/octet-stream 1.4 KB

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-06-04 00:19:42
Message-ID: CAM3SWZRVk9xC2A=z-17Z9Aip4nRxF1BKfQMGKBsmjDjaYv61tw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, May 13, 2013 at 3:22 PM, Peter Geoghegan <pg(at)heroku(dot)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


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-06-04 12:39:18
Message-ID: 51ADDFF6.8020801@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 6/3/13 8:19 PM, Peter Geoghegan wrote:
> On Mon, May 13, 2013 at 3:22 PM, Peter Geoghegan <pg(at)heroku(dot)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.


From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-06-04 12:46:53
Message-ID: 20130604124653.GI12323@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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(at)heroku(dot)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


From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-06-04 16:00:10
Message-ID: CAM3SWZTp=r2oZupvCCCRL6vaSO+rSTRXTZJNUyGFhoJ4_ieU4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jun 4, 2013 at 5:46 AM, Andres Freund <andres(at)2ndquadrant(dot)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


From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: local_preload_libraries logspam
Date: 2013-11-23 21:30:50
Message-ID: 1385242250.7500.39.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2013-05-13 at 15:22 -0700, Peter Geoghegan wrote:
> On Tue, May 7, 2013 at 7:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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