pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
logging aql queries only one table or tables of one scheme
3+ messages / 3 participants
[nested] [flat]

* logging aql queries only one table or tables of one scheme
@ 2018-11-19 09:36 Häfliger Guido <guido.haefliger@vogelwarte.ch>
  2018-11-19 16:13 ` Re: logging aql queries only one table or tables of one scheme David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Häfliger Guido @ 2018-11-19 09:36 UTC (permalink / raw)
  To: pgsql-admin

Hello

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.

Maybe there are other possibilities to achieve this target?

Guido Häfliger

____________________________________________________

Dipl. Ing. ETH Guido Häfliger
EDV/GIS-Spezialist
Tel. ++41 41 462 97 60
guido.haefliger@vogelwarte.ch<mailto:guido.haefliger@vogelwarte.ch>
www.vogelwarte.ch<http://www.vogelwarte.ch/;

Schweizerische Vogelwarte | Seerose 1 | CH-6204 Sempach | Schweiz
Station ornithologique suisse | Seerose 1 | CH-6204 Sempach | Suisse
Stazione ornitologica svizzera | Seerose 1 | CH-6204 Sempach | Svizzera
Swiss Ornithological Institute | Seerose 1 | CH-6204 Sempach | Switzerland

Willkommen im neuen Besuchszentrum in Sempach! http://www.vogelwarte.ch/de/besuch/
Bienvenue au nouveau centre de visite à Sempach! http://www.vogelwarte.ch/fr/visite/

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: logging aql queries only one table or tables of one scheme
  2018-11-19 09:36 logging aql queries only one table or tables of one scheme Häfliger Guido <guido.haefliger@vogelwarte.ch>
@ 2018-11-19 16:13 ` David G. Johnston <david.g.johnston@gmail.com>
  2018-11-19 19:03   ` Re: logging aql queries only one table or tables of one scheme Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2018-11-19 16:13 UTC (permalink / raw)
  To: guido.haefliger@vogelwarte.ch; +Cc: pgsql-admin

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).

David J.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: logging aql queries only one table or tables of one scheme
  2018-11-19 09:36 logging aql queries only one table or tables of one scheme Häfliger Guido <guido.haefliger@vogelwarte.ch>
  2018-11-19 16:13 ` Re: logging aql queries only one table or tables of one scheme David G. Johnston <david.g.johnston@gmail.com>
@ 2018-11-19 19:03   ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Achilleas Mantzios @ 2018-11-19 19:03 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org


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.
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-11-19 19:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19 09:36 logging aql queries only one table or tables of one scheme Häfliger Guido <guido.haefliger@vogelwarte.ch>
2018-11-19 16:13 ` David G. Johnston <david.g.johnston@gmail.com>
2018-11-19 19:03   ` Achilleas Mantzios <achill@matrix.gatewaynet.com>

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