AW: logging aql queries only one table or tables of one scheme

From: Häfliger Guido <guido(dot)haefliger(at)vogelwarte(dot)ch>
To: 'Achilleas Mantzios' <achill(at)matrix(dot)gatewaynet(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: AW: logging aql queries only one table or tables of one scheme
Date: 2018-11-20 07:05:57
Message-ID: D2417C80A342B246BEAF2C90A301E0AF76FCFD1B@MailNT.vogelwarte.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks a lot for your hints, I will try to do it with pgaudit, seems to be a useful tool

Best regards
Guido

-----Ursprüngliche Nachricht-----
Von: Achilleas Mantzios [mailto:achill(at)matrix(dot)gatewaynet(dot)com]
Gesendet: Montag, 19. November 2018 20:04
An: pgsql-admin(at)lists(dot)postgresql(dot)org
Betreff: Re: logging aql queries only one table or tables of one scheme

On 19/11/18 6:13 μ.μ., David G. Johnston wrote:
> On Mon, Nov 19, 2018 at 2:38 AM Häfliger Guido
> <guido(dot)haefliger(at)vogelwarte(dot)ch> wrote:
>> Is it possible to enable query statement logging only for one table (or one scheme)? If I set log_min_duration_statement = 0 everything is logged, the log-files becomes huge.
> No, that particular setting (like most) doesn't operate at a
> sub-session level. And since it is super-user only changing it for
> individual queries is not recommended - though you could create a
> security definer function to make it doable (never tried it myself).

pgaudit does the trick, but it takes some reading to get what you need.

>
> David J.
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Adrien NAYRAT 2018-11-20 08:05:17 Re: Can long-running VACUUM be interrupted?
Previous Message Andrey Zhidenkov 2018-11-20 03:58:43 Can long-running VACUUM be interrupted?