From a.mantzios@cloud.gatewaynet.com Fri May 15 23:22:11 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4ynq-00ALWu-Ek for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 09:11:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u4ymo-00AHrw-Sg for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 09:10:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4ymo-00AHro-HH for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 09:10:27 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4yml-000Mm6-2F for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 09:10:26 +0000 Content-Type: multipart/alternative; boundary="------------JWGrlAvPNfqJ6Ij2blGJHS4y" Message-ID: <54b3d612-363e-4c05-8a08-a7563c7d52f1@cloud.gatewaynet.com> Date: Wed, 16 Apr 2025 10:10:22 +0100 MIME-Version: 1.0 Subject: Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately To: pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------JWGrlAvPNfqJ6Ij2blGJHS4y Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/15/25 12:14, KENAN ÇİFTÇİ wrote: > Hi, > > You can use pgaudit and pgauditlogtofile extension > (https://github.com/fmbiete/pgauditlogtofile) together to write audit > logs in a separate file. One issue we have with pgaudit is that it prints AUDIT records even if the xaction gets rollbacked, how do you alleviate that ? > > yours, > > Kenan Çiftçi > > On Tue, Apr 15, 2025 at 1:44 PM vijay patil > wrote: > > Hi All, > > We are exploring auditing solutions for our PostgreSQL database > and are considering using |pgaudit| for this purpose. However, we > have a few questions: > > 1. > > *What is the best tool for auditing PostgreSQL databases?* > > * > > We are specifically looking for a solution that offers > detailed auditing capabilities and is compatible with our > setup. > > 2. > > *Can we store the audit information separately from PostgreSQL > logs if we decide to use |pgaudit|?* > > * > > We would prefer to keep the audit logs in a separate file > or location for easier management and analysis. > > > We appreciate any help or suggestions! > > > Thanks > > Vijay > --------------JWGrlAvPNfqJ6Ij2blGJHS4y Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 4/15/25 12:14, KENAN ÇİFTÇİ wrote:

Hi,

You can use pgaudit and pgauditlogtofile extension (https://github.com/fmbiete/pgauditlogtofile) together to write audit logs in a separate file.
One issue we have with pgaudit is that it prints AUDIT records even if the xaction gets rollbacked, how do you alleviate that ?

yours,

Kenan Çiftçi

On Tue, Apr 15, 2025 at 1:44 PM vijay patil <vijay.postgres@gmail.com> wrote:

Hi All,

We are exploring auditing solutions for our PostgreSQL database and are considering using pgaudit for this purpose. However, we have a few questions:

  1. What is the best tool for auditing PostgreSQL databases?

    • We are specifically looking for a solution that offers detailed auditing capabilities and is compatible with our setup.

  2. Can we store the audit information separately from PostgreSQL logs if we decide to use pgaudit?

    • We would prefer to keep the audit logs in a separate file or location for easier management and analysis.


We appreciate any help or suggestions!


Thanks

Vijay

--------------JWGrlAvPNfqJ6Ij2blGJHS4y-- From ronljohnsonjr@gmail.com Fri May 15 23:23:14 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u5206-00B4SR-IQ for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 12:36:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u5204-00DzP8-Cc for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 12:36:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u5203-00DzJk-S9 for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 12:36:20 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u5202-000N1Z-0h for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 12:36:19 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-601a46ee19fso3253263eaf.0 for ; Wed, 16 Apr 2025 05:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744806978; x=1745411778; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=rcGqUwAJ/vhWIg0voE2/2qrcZwARq4hznYt7o8BElrs=; b=X8z2hjq1yD2eG5bkSoOgHxypYddFC+pBVCw+6VM2UE1bHmu2UYC1iTgSd6mHL95PGc 6KqV+Rdogql8b21MS/LYyhjfZQ0hgo1Wff8RA0X5o49F8hSkhhUYxwTdYuxehYP8RgDP QzU+MOxbHa4U9NVVYZcQlCyQci6zsQt1ZHLQNtcZhqAJZAAeGORSXlK7iDAoNYkEYYUt Es9BkvQlUf7rSnz08MJHMJfbpXXETdgNECbm0ryDPhZ00piF7St9FqRR+fIEvGL7SQyQ i+w7yFjU1EAJf8wcGLLe1hVLod4GrjRJk+uBt1Vk//cP979Df21W/NqaKOdPn5SjVeTn yp1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744806978; x=1745411778; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rcGqUwAJ/vhWIg0voE2/2qrcZwARq4hznYt7o8BElrs=; b=qkgGN3TsScjlxP6hXK42Cg82uU9WTWEOU4QEu48JChlRUqqWv4yuMCuVlGqHbGO7SE IydDp0zALF5farxq41paG3CwkaEFzlW19fe5aFjFRGC8gzgZ1G3v7iFuaCt1PkVd4mhE dL9SELRnocQIsCpDLCzS1AzTavclWBN779WogHk0oKFy7JoZhZYSOkId+RPLDP+Wt8cG FFIs/7ntNWtuijbHfYUy9QZY/eWxi7J3L4nosnBi4TVKvcRC0gi4wN2zj76i3vvF5637 HMZLpsD1RGWAuwlgrq4aO4CVUAlCul3POZgVTP2y23JHwHY2cUhfYhYP4p4PCeUTcF7r CSdw== X-Gm-Message-State: AOJu0YwlzfyI9F/PW1HKtBy1Owc6jEWwmqWcPSpkvYED8H3YxknO2LOa uO6o0rNO9RUDLBBE1ZLoY7JMNbw6yQxCAIcfd0ip2M6gRmxdzbg884JqIZH1KQS87P6m9J3a5VU HOEtbMhvnrRQZzi68ovQ+sx3zSYSw+4p3 X-Gm-Gg: ASbGncusuiHYKJHHIIDgOdLl2N9yvZ7hYLOpwBlX3csAK8nUYxEpnaeecf1mPdceWLd e0JcBETATzr8MZ+qR/1TmXYoeFUZGKxprFYmQScPMaWFAdsSGQjCEsAkzvWy3KOQcsLq0KsDsRW G+I9IBDefmrUN4qv5kKS1doQU= X-Google-Smtp-Source: AGHT+IFjkvFEdIqhq/3do9dNiG6nG6xd2qvMM5Hg6Gh5RPDL3mfrmnFq/1VgWzxY+zPNj+e4PkPBXEq9zneK3Xbz3H0= X-Received: by 2002:a05:6820:54d:b0:603:f820:7be4 with SMTP id 006d021491bc7-604a930c68bmr711195eaf.8.1744806977642; Wed, 16 Apr 2025 05:36:17 -0700 (PDT) MIME-Version: 1.0 References: <54b3d612-363e-4c05-8a08-a7563c7d52f1@cloud.gatewaynet.com> In-Reply-To: <54b3d612-363e-4c05-8a08-a7563c7d52f1@cloud.gatewaynet.com> From: Ron Johnson Date: Wed, 16 Apr 2025 08:36:06 -0400 X-Gm-Features: ATxdqUGhJB8Ww8RM9YrMeG4NLzE-SenunAU7OnWvBiY27A36ThpnKXSKIMw1xog Message-ID: Subject: Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000001aa70f0632e4881f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001aa70f0632e4881f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable pgaudit is statement-level, not transaction-level; that's its nature. This is the same as log_statement. On Wed, Apr 16, 2025 at 5:10=E2=80=AFAM Achilleas Mantzios - cloud < a.mantzios@cloud.gatewaynet.com> wrote: > On 4/15/25 12:14, KENAN =C3=87=C4=B0FT=C3=87=C4=B0 wrote: > > Hi, > > You can use pgaudit and pgauditlogtofile extension ( > https://github.com/fmbiete/pgauditlogtofile) together to write audit logs > in a separate file. > > One issue we have with pgaudit is that it prints AUDIT records even if th= e > xaction gets rollbacked, how do you alleviate that ? > > > yours, > > Kenan =C3=87ift=C3=A7i > > On Tue, Apr 15, 2025 at 1:44=E2=80=AFPM vijay patil > wrote: > >> Hi All, >> >> We are exploring auditing solutions for our PostgreSQL database and are >> considering using pgaudit for this purpose. However, we have a few >> questions: >> >> 1. >> >> *What is the best tool for auditing PostgreSQL databases?* >> - >> >> We are specifically looking for a solution that offers detailed >> auditing capabilities and is compatible with our setup. >> 2. >> >> *Can we store the audit information separately from PostgreSQL logs >> if we decide to use pgaudit?* >> - >> >> We would prefer to keep the audit logs in a separate file or >> location for easier management and analysis. >> >> >> We appreciate any help or suggestions! >> >> >> Thanks >> >> Vijay >> > --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000001aa70f0632e4881f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

pgaudit is statement-level= , not transaction-level; that's its nature.=C2=A0 This is the same as l= og_statement.

On Wed, Apr = 16, 2025 at 5:10=E2=80=AFAM Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> = wrote:
=20 =20 =20

On 4/15/25 12:14, KENAN =C3=87=C4=B0FT=C3=87=C4=B0 wrote:

=20
Hi,

You can use pgaudit and pgauditlogtofile extension (https://git= hub.com/fmbiete/pgauditlogtofile) together=C2=A0to write audit logs in a separate=C2=A0file.
One issue we have with pgaudit is that it prints AUDIT records even if the xaction gets rollbacked, how do you alleviate that ?

yours,

Kenan =C3=87ift=C3=A7i

On Tue, Apr 15, 2025 at 1:44=E2=80=AFPM vijay patil <vijay.postgres@gmail.com> wrote:

Hi All,

We are exploring auditing solutions for our PostgreSQL database and are considering using pgaudit for this purpose. However, we have a few questions:

  1. What is the best tool for auditing PostgreSQL databases?

    • We are specifically looking for a solution that offers detailed auditing capabilities and is compatible with our setup.

  2. Can we store the audit information separately from PostgreSQL logs if we decide to use pgaudit?

    • We would prefer to keep the audit logs in a separate file or location for easier management and analysis.


We appreciate any help or suggestions!


Thanks

Vijay



--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobs= ter!
--0000000000001aa70f0632e4881f-- From a.mantzios@cloud.gatewaynet.com Fri May 15 23:24:06 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u56fc-00CLqm-Tl for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 17:35:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u56fb-001feE-5l for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 17:35:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u56fa-001fap-OA for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 17:35:31 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u56fX-000Qgr-30 for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 17:35:30 +0000 Content-Type: multipart/alternative; boundary="------------onEFscPcKEMA42SZ9lvDz9SX" Message-ID: Date: Wed, 16 Apr 2025 20:35:26 +0300 MIME-Version: 1.0 Subject: Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately To: pgsql-general@lists.postgresql.org References: <54b3d612-363e-4c05-8a08-a7563c7d52f1@cloud.gatewaynet.com> Content-Language: en-US From: Achilleas Mantzios In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------onEFscPcKEMA42SZ9lvDz9SX Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 16/4/25 15:36, Ron Johnson wrote: > > pgaudit is statement-level, not transaction-level; that's its nature.  > This is the same as log_statement. ok, but log_statement prints ROLLBACKs/COMMITs, but pgaudit not. > > On Wed, Apr 16, 2025 at 5:10 AM Achilleas Mantzios - cloud > wrote: > > On 4/15/25 12:14, KENAN ÇİFTÇİ wrote: > >> Hi, >> >> You can use pgaudit and pgauditlogtofile extension >> (https://github.com/fmbiete/pgauditlogtofile) together to write >> audit logs in a separate file. > One issue we have with pgaudit is that it prints AUDIT records > even if the xaction gets rollbacked, how do you alleviate that ? >> >> yours, >> >> Kenan Çiftçi >> >> On Tue, Apr 15, 2025 at 1:44 PM vijay patil >> wrote: >> >> Hi All, >> >> We are exploring auditing solutions for our PostgreSQL >> database and are considering using |pgaudit| for this >> purpose. However, we have a few questions: >> >> 1. >> >> *What is the best tool for auditing PostgreSQL databases?* >> >> * >> >> We are specifically looking for a solution that >> offers detailed auditing capabilities and is >> compatible with our setup. >> >> 2. >> >> *Can we store the audit information separately from >> PostgreSQL logs if we decide to use |pgaudit|?* >> >> * >> >> We would prefer to keep the audit logs in a separate >> file or location for easier management and analysis. >> >> >> We appreciate any help or suggestions! >> >> >> Thanks >> >> Vijay >> > > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! --------------onEFscPcKEMA42SZ9lvDz9SX Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 16/4/25 15:36, Ron Johnson wrote:


pgaudit is statement-level, not transaction-level; that's its nature.  This is the same as log_statement.
ok, but log_statement prints ROLLBACKs/COMMITs, but pgaudit not.

On Wed, Apr 16, 2025 at 5:10 AM Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:

On 4/15/25 12:14, KENAN ÇİFTÇİ wrote:

Hi,

You can use pgaudit and pgauditlogtofile extension (https://github.com/fmbiete/pgauditlogtofile) together to write audit logs in a separate file.
One issue we have with pgaudit is that it prints AUDIT records even if the xaction gets rollbacked, how do you alleviate that ?

yours,

Kenan Çiftçi

On Tue, Apr 15, 2025 at 1:44 PM vijay patil <vijay.postgres@gmail.com> wrote:

Hi All,

We are exploring auditing solutions for our PostgreSQL database and are considering using pgaudit for this purpose. However, we have a few questions:

  1. What is the best tool for auditing PostgreSQL databases?

    • We are specifically looking for a solution that offers detailed auditing capabilities and is compatible with our setup.

  2. Can we store the audit information separately from PostgreSQL logs if we decide to use pgaudit?

    • We would prefer to keep the audit logs in a separate file or location for easier management and analysis.


We appreciate any help or suggestions!


Thanks

Vijay



--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
--------------onEFscPcKEMA42SZ9lvDz9SX--