On Tue, May 26, 2026 at 02:39:12PM +0900, Kyotaro Horiguchi wrote:
> In write_syslogger_file, there's already a fallback path to
> write_stderr() when fwrite fails. Would it make sense to treat logfile
> == NULL as an error case as well?

It does not make much sense to me.  A write failure is based on the
fact that something went wrong in the underlying OS, most likely in
the file system, and that's not something Postgres has any idea about.
This issue is different, it is a Postgres logic bug, so adding an
exception like the one you are suggesting is just a shortcut hiding
the real issue: the log file is not ready yet, but the syslogger is
invoked at a point when it thinks the log file exists.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to