From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "Yves Lavoie, GaYLi" <ylavoie(at)yveslavoie(dot)com> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Filter logging by table |
Date: | 2016-11-25 21:42:37 |
Message-ID: | CAKFQuwaUSw1nCQmHLFn+eFtW03ZTe9dv3-KbmOAwrdiMZBGpDg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Tue, Nov 22, 2016 at 11:19 AM, Yves Lavoie, GaYLi <ylavoie(at)yveslavoie(dot)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.
https://www.postgresql.org/docs/9.6/static/runtime-config-logging.html#GUC-LOG-STATEMENT
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2016-11-28 21:47:29 | Re: Some questions about old_snapshot_threshold |
Previous Message | Guillaume Lelarge | 2016-11-25 21:30:05 | Re: Filter logging by table |