From: | Serkan Akdemir <osmosyum(at)hotmail(dot)com> |
---|---|
To: | Tejaswi K T <tejaswi(dot)kt(at)gmail(dot)com> |
Cc: | "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Values Logged in Logfile of postgres logs |
Date: | 2024-04-23 07:56:12 |
Message-ID: | MW3PR19MB41855D56C51F0A4E93498A5DC3112@MW3PR19MB4185.namprd19.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
If you want to have some kind of auditing mechanism, you need to use pgaudit.
Logging all statements to pglog is not a good idea. Even setting log_min_duration_statement = 0 is not a fesible too. You need to set this whenever you want to trace anything, later disable or set to reasonable value.
Tejaswi K T <tejaswi(dot)kt(at)gmail(dot)com> şunları yazdı (22 Nis 2024 23:01):
Hi Friends,
My postgres log has an insert statement with values too .
Is this safe of logging the values in the log file.
Is there a way to mask the values whenever DML operations happen.
--------------------inserting record -------------------
postgres=# insert into test (id) values(4);
INSERT 0 1
postgres=# show log_min_duration_statement;
log_min_duration_statement
----------------------------
0 -- to capture all statements happening
(1 row)
2024-04-22 21:54:13.989 CEST [11805] postgres(at)postgres LOG: duration: 10.455 ms statement: insert into test (id) values(4);
2024-04-22 21:54:23.197 CEST [11805] postgres(at)postgres ERROR: unrecognized configuration parameter "log_min_duration"
------------ the above log has values of what data got inserted as well.
regards
Tejas
From | Date | Subject | |
---|---|---|---|
Next Message | Vitale, Anthony, Sony Music | 2024-04-24 16:40:56 | ERROR: index row size 2720 exceeds btree version 4 maximum 2704 for index in V14 but pg_column_size calculates 2701 |
Previous Message | Tejaswi K T | 2024-04-22 20:00:34 | Values Logged in Logfile of postgres logs |