Re: Fix resource leaks in pg_receivewal on LZ4 close failures

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix resource leaks in pg_receivewal on LZ4 close failures
Date: 2026-11-11 15:55:43
Message-ID: CAHGQGwHUeh9KU_ZGmyjSoZdSUuhrDYDxQgF=qHx2tYPs_1dK9g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 11, 2026 at 7:52 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> Which bypasses the operations for successful close(df->fd), is that intentional?

Yes. Previously, if compression finalization or the final write failed,
the function returned -1 immediately, skipping rename, unlink, and
sync. So the patch just preserves that behavior while releasing
the resources.

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-11-11 16:21:14 Re: REPACK (CONCURRENTLY) decoding worker is canceled by lock_timeout
Previous Message Álvaro Herrera 2026-11-11 15:53:54 Re: [PATCH] Misleading error message for REPACK USING INDEX on shared catalogs