Postgres pgaudit CSV-Logs can they be written outside the instance directory.

From: "Subramanian,Ramachandran" <ramachandran(dot)subramanian(at)alte-leipziger(dot)de>
To: "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Postgres pgaudit CSV-Logs can they be written outside the instance directory.
Date: 2026-09-01 09:26:24
Message-ID: dc8714a3ac994f4abe9c82d24f728772@alte-leipziger.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

We have a statuatory monitoring requirement (SIEM-SOC/NTT) for which we are asked to turn on the below parms.

The problem is, that so much data is generated, that the logs become bigger than the actual database. Every 1 hour we generate 48MB of data ( not sure who can read through so much data and make sense of it , but it is beside the point).

Adding to this problem, These csv logs are backed up every day ( as they reside inside the directory that belongs to the instance ).

Is there any way by which we can write this CSVLOG outside the $HOME/data/log directory, so that it need not be part of the backups and is there a way to have a sliding window of say only the last 10000 entries in the log ( This sounds a bit risky because any information critical to the health of the instance may be lost ) .

Is there any way by which we can tell pgaudit to write it's information outside the Instance directory?

LG

Ram

log_destination = 'csvlog'
logging_collector = on

log_line_prefix = '%m [%p] %c %u(at)%d %r %a '

log_statement = 'none'

log_connections = on
log_disconnections = on
log_checkpoints = on
log_lock_waits = on
log_replication_commands = on

log_error_verbosity = verbose

log_min_duration_statement = 5000

shared_preload_libraries = 'pgaudit'

pgaudit.log = 'WRITE,DDL,ROLE,FUNCTION'
pgaudit.log_relation = on
pgaudit.log_parameter = on

Freundliche Grüße

i. A. Ramachandran Subramanian
Zentralbereich Informationstechnologie

Alte Leipziger Lebensversicherung a.G.

Hallesche Krankenversicherung a.G.

Alte Leipziger Lebensversicherung a.G., Alte Leipziger-Platz 1, 61440 Oberursel
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Robert Gladis, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape, Udo Wilcsek
Sitz Oberursel (Taunus) · Rechtsform VVaG · Amtsgericht Bad Homburg v. d. H. HRB 1583 · USt.-IdNr. DE 114106814


Hallesche Krankenversicherung a.G., Löffelstraße 34-38, 70597 Stuttgart
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Robert Gladis, Dr. Jochen Kriegmeier, Alexander Mayer,
Christian Pape, Udo Wilcsek
Sitz Stuttgart · Rechtsform VVaG · Amtsgericht Stuttgart HRB 2686 · USt.-IdNr. DE 147802285
Beiträge zu privaten Kranken- und Pflegekrankenversicherungen unterliegen nicht der Versicherungsteuer (§ 4 Nr. 5 VersStG) · Versicherungsleistungen sowie Umsätze aus Versicherungsvertreter-/Maklertätigkeiten sind umsatzsteuerfrei


Die Pflichtangaben der ALH Gruppe gemäß § 35a GmbHG bzw. § 80 AktG finden Sie hier: https://www.alte-leipziger.de/impressum

______________________

ALH Gruppe
Alte Leipziger-Platz 1, 61440 Oberursel
Tel.: +49 (6171) 66-4882
Fax: +49 (6171) 66-800-4882
E-Mail: ramachandran(dot)subramanian(at)alte-leipziger(dot)de
www.alte-leipziger.de
www.hallesche.de

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Justin 2026-09-01 12:12:24 Re: Postgres pgaudit CSV-Logs can they be written outside the instance directory.
Previous Message Laurenz Albe 2026-08-27 07:22:30 Re: Disk layout for parallel instances