postgres.git / summary / log / commit / refs

commit    7e6e294e4e451c55c52caa1ff68df9858912d066
Author:   Nathan Bossart <nathan@postgresql.org>
Date:     Fri Aug 14 20:27:16 2026 +0000

    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 b9b6e6b29fc..596fd45a3db 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -7152,7 +7152,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> @@ -7160,6 +7160,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: 1b87dd4303a9]