pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: logging aql queries only one table or tables of one scheme
Date: Mon, 19 Nov 2018 21:03:49 +0200
Message-ID: <45b317b6-6b12-0a64-329d-9080ff1a9be3@matrix.gatewaynet.com> (raw)
In-Reply-To: <CAKFQuwZMi9R3VEmDzNK6=LibmZ=BTZnNpYXVNrOchjHS=jH_GA@mail.gmail.com>
References: <D2417C80A342B246BEAF2C90A301E0AF76FCED6F@MailNT.vogelwarte.ch>
	<CAKFQuwZMi9R3VEmDzNK6=LibmZ=BTZnNpYXVNrOchjHS=jH_GA@mail.gmail.com>


On 19/11/18 6:13 μ.μ., David G. Johnston wrote:
> On Mon, Nov 19, 2018 at 2:38 AM Häfliger Guido
> <guido.haefliger@vogelwarte.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.
>




view thread (3+ messages)

Message-ID: <45b317b6-6b12-0a64-329d-9080ff1a9be3@matrix.gatewaynet.com>
Permalink:  ../45b317b6-6b12-0a64-329d-9080ff1a9be3@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/45b317b6-6b12-0a64-329d-9080ff1a9be3@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: logging aql queries only one table or tables of one scheme
  In-Reply-To: <45b317b6-6b12-0a64-329d-9080ff1a9be3@matrix.gatewaynet.com>
  References: <D2417C80A342B246BEAF2C90A301E0AF76FCED6F@MailNT.vogelwarte.ch> <CAKFQuwZMi9R3VEmDzNK6=LibmZ=BTZnNpYXVNrOchjHS=jH_GA@mail.gmail.com> <45b317b6-6b12-0a64-329d-9080ff1a9be3@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox