[pgpool-hackers: 4562] [PATCH] Feature: CSV Logging support

Umar Hayat m.umarkiani at gmail.com
Tue Jan 21 19:10:03 JST 2025


Hi Hackers,
Recently csv logging support was requested [1]. IMO it's a reasonable
request and we already have basic infrastructure to extend it for CSV
logging for log_destination.

Attached patch is the first draft and it covers changes in code,
documentation and sample file.

Example Records:
"2025-01-15 10:35:39","main",97058,LOG,21,"[No Connection]","[No
Connection]","pgpool-II successfully started. version 4.6devel
(chirikoboshi)",,,

"2025-01-15 10:35:39","main",97058,WARNING,13,"[No Connection]","[No
Connection]","failed to create INET domain socket","bind on socket
failed with error ""Cannot assign requested address""",,

"2025-01-15 10:36:36","psql",97072,LOG,1,"postgres","postgres","pool_send_and_wait:
Error or notice message from backend: DB node id: 0 backend pid: 97099
statement: ""select a;"" message: ""column ""a"" does not exist""",,,

Following fields are logged in CSV record in order:
datetime, application name, process id, error severity, line number,
user name, database name, error message, error details, error hint [,
[function] & filename + line number] (if PGERROR_VERBOSE)

Please let me know your opinion about this and also about the fields
covered in csv records and their order.

Regards
Umar Hayat

[1] https://www.pgpool.net/pipermail/pgpool-hackers/2024-December/004556.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v1-0001-csv-log-support.diff
Type: application/octet-stream
Size: 9772 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20250121/418bbbec/attachment.obj>


More information about the pgpool-hackers mailing list