Truncate logs by max_log_size
Kirill Gavrilov <diphantxm@gmail.com>
From: diPhantxm <diphantxm@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2024-09-26T18:30:08Z
Lists: pgsql-hackers
Attachments
- 0001-parameter-max_log_size-to-truncate-logs.patch (application/octet-stream) patch 0001
Hi hackers, I would like to suggest a patch to truncate some long queries. I believe sometimes there is no need to log a query containing some gigabytes of blob, for example. In patch a new parameter, named max_log_size, is introduced. It defines the maximum size of logged query, in bytes. Everything beyond that size is truncated. Best regards, Kirill Gavrilov
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix log_statement_max_length test with verbose logs
- 9bfbf5bf6190 master landed
-
Add log_statement_max_length GUC to limit logged statement text
- c8bd8387c27a master landed
-
Improve user control over truncation of logged bind-parameter values.
- 0b34e7d307e6 13.0 cited