On 26th of August 2023, Michael Paquier committed patch:
Generate new LOG for "trust" connections under log_connections
Adding an extra LOG for connections that have not set an authn ID, like
when the "trust" authentication method is used, is useful for audit
A couple of TAP tests for SSL and authentication need to be tweaked to
adapt to this new LOG generated, as some scenarios expected no logs but
they now get a hit.
Reported-by: Shaun Thomas
Author: Jacob Champion
Reviewed-by: Robert Haas, Michael Paquier
Continue reading Waiting for PostgreSQL 17 – Generate new LOG for “trust" connections under log_connections
On 17th of January 2022, Michael Paquier committed patch:
"jsonlog" is a new value that can be added to log_destination to provide
logs in the JSON format, with its output written to a file, making it
the third type of destination of this kind, after "stderr" and
"csvlog". The format is convenient to feed logs to other applications.
There is also a plugin external to core that provided this feature using
the hook in elog.c, but this had to overwrite the output of "stderr" to
work, so being able to do both at the same time was not possible. The
files generated by this log format are suffixed with ".json", and use
the same rotation policies as the other two formats depending on the
This takes advantage of the refactoring work done previously in ac7c807,
bed6ed3, 8b76f89 and 2d77d83 for the backend parts, and 72b76f7 for the
TAP tests, making the addition of any new file-based format rather
The documentation is updated to list all the keys and the values that
can exist in this new format. pg_current_logfile() also required a
refresh for the new option.
Author: Sehrope Sarkuni, Michael Paquier
Reviewed-by: Nathan Bossart, Justin Pryzby
Continue reading Waiting for PostgreSQL 15 – Introduce log_destination=jsonlog
Just so that it will be perfectly clear: the logs I have in mind are the ones for DBAs to read – with slow queries, errors, and other interesting information.
So, how does one find them?
Continue reading Starting with Pg – where are logs?
On 6th of April 2020, Amit Kapila committed patch:
Allow autovacuum to log WAL usage statistics.
This commit allows autovacuum to log WAL usage statistics added by commit
Author: Julien Rouhaud
Reviewed-by: Dilip Kumar and Amit Kapila
Continue reading Waiting for PostgreSQL 13 – Allow autovacuum to log WAL usage statistics.
On 29th of November 2018, Alvaro Herrera committed patch:
Add log_statement_sample_rate parameter
This allows to set a lower log_min_duration_statement value without
incurring excessive log traffic (which reduces performance). This can
be useful to analyze workloads with lots of short queries.
Author: Adrien Nayrat
Continue reading Waiting for PostgreSQL 12 – Add log_statement_sample_rate parameter
On 10th of March, Magnus Hagander committed patch:
Report pg_hba line number and contents when users fail to log in
Instead of just reporting which user failed to log in, log both the
line number in the active pg_hba.conf file (which may not match reality
in case the file has been edited and not reloaded) and the contents of
the matching line (which will always be correct), to make it easier
to debug incorrect pg_hba.conf files.
The message to the client remains unchanged and does not include this
information, to prevent leaking security sensitive information.
Reviewed by Tom Lane and Dean Rasheed
Continue reading Waiting for 9.3 – Report pg_hba line number and contents when users fail to log in
On 28th of November Tom Lane committed patch by Dave Page, which adds new capability to system monitoring and logging:
Add support for an application_name parameter, which is displayed in
pg_stat_activity and recorded in log entries.
Dave Page, reviewed by Andres Freund
Continue reading Waiting for 8.5 – Application name reporting
Also yesterday, and also Peter Eisentraut, committed patch by Guillaume Smet, which:
Add log_line_prefix placeholder %e to contain the current SQL state
Author: Guillaume Smet
Continue reading Waiting for 8.5 – Add log_line_prefix placeholder %e to contain the current SQL state
On 19th of November Tom Lane committed patch by Takahiro Itagaki which does:
Add auto-explain contrib module for automatic logging of the plans of
Continue reading Waiting for 8.4 – auto-explain