Re: [PATCH] Fixed creation of empty .log files during log rotation

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Арсений Косицын <a(dot)kositsyn(at)postgrespro(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Fixed creation of empty .log files during log rotation
Date: 2025-11-24 10:49:11
Message-ID: aSQ4JyhfQ4u8EsnS@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 18, 2025 at 06:31:19PM -0500, Tom Lane wrote:
> So the argument that these .log files won't contain any useful
> data is false.
>
> A conceivable improvement is to make the logger unlink a log file if
> it's still empty after we stop using it. Even that would need a
> switch IMO, since it might break somebody's log-archiving script.
> But I'm doubtful that it's worth the trouble.

FWIW, after reading again the thread and the arguments in place, I am
still not convinced that there is something to do here.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2025-11-24 11:04:01 Re: BUG #19095: Test if function exit() is used fail when linked static
Previous Message Viktor Holmberg 2025-11-24 10:39:32 Re: ON CONFLICT DO SELECT (take 3)