Re: Filter logging by table - Mailing list pgsql-admin

From David G. Johnston
Subject Re: Filter logging by table
Date
Msg-id CAKFQuwaUSw1nCQmHLFn+eFtW03ZTe9dv3-KbmOAwrdiMZBGpDg@mail.gmail.com
Whole thread Raw
In response to Filter logging by table  ("Yves Lavoie, GaYLi" <ylavoie@yveslavoie.com>)
List pgsql-admin
On Tue, Nov 22, 2016 at 11:19 AM, Yves Lavoie, GaYLi <ylavoie@yveslavoie.com> wrote:
Hi PG Gurus,

I need to filter out logging for some tables. We have an application
which often query for a settings table and for pg_proc. This pollutes
postgresql.log with numerous useless queries and we are looking for a
way to skip logging entirely for those. Any suggestion?

​Don't know for sure if this will work but I'd probably wrap the relevant query in a function and add "SET log_statements = none" at the top.  You'll need to make the function "security definer" and make it owned by a superuser.


David J.
 

pgsql-admin by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Filter logging by table
Next
From: Kevin Grittner
Date:
Subject: Re: Some questions about old_snapshot_threshold