postgres.git / summary / log / commit / refs

commit    247ef8481d89c04554702a0d18ec5455fb19f321
Author:   Nathan Bossart <nathan@postgresql.org>
Date:     Fri Aug 14 20:27:16 2026 +0000
First released in: 14.25, 15.20, 16.16, 17.12, 18.7, 19.0

    doc: Clarify the logging collector's guarantees.
    
    Presently, the documentation for logging_collector says that the
    collector "is designed to never lose messages," which reads as a
    stronger promise than we actually make.  The collector does not
    fsync the log file or retry failed writes, so log messages can go
    missing after an operating system crash, power loss, or a write
    error.  Reword that sentence and add a note about what is not
    guaranteed.
    
    Author: Daniel Bauman <danielbaniel@gmail.com>
    Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
    Reviewed-by: Zhenwei Shang <a934172442@gmail.com>
    Reviewed-by: Robert Treat <rob@xzilla.net>
    Discussion: https://postgr.es/m/CAMtj0_a86DdDKkW-ReVpQpqjndVS6GMrwXVpQY4G3-SGY7saMQ%40mail.gmail.com
    Backpatch-through: 14


doc/src/sgml/config.sgml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index d97d77ea227..7faa1978550 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -6808,7 +6808,7 @@ local0.* /var/log/postgresql <note> <para> - The logging collector is designed to never lose messages. This means + The logging collector is designed to avoid dropping messages. This means that in case of extremely high load, server processes could be blocked while trying to send additional log messages when the collector has fallen behind. In contrast, <application>syslog</application> @@ -6816,6 +6816,11 @@ local0.* /var/log/postgresql may fail to log some messages in such cases but it will not block the rest of the system. </para> + <para> + The logging collector does not guarantee that log messages have + reached durable storage. It can still lose messages due to a system + crash, power loss, or an error while writing the log file. + </para> </note> </listitem> [parent: d41b3e5865d4]