Fix resource leaks in pg_receivewal on LZ4 close failures

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Fix resource leaks in pg_receivewal on LZ4 close failures
Date: 2026-11-11 09:48:51
Message-ID: CAHGQGwHfCrEogr6=wr0nCkQevAJ9A3HBqQRjT9iJryO7EjF6Lw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I'd like to propose the attached patch to fix file descriptor and
memory leaks when LZ4 compression finalization or the final write
fails. Without this fix, repeated failures can cause these resources
to accumulate.

Thoughts?

Regards,

--
Fujii Masao

Attachment Content-Type Size
v1-0001-pg_receivewal-Fix-resource-leaks-and-error-report.patch application/octet-stream 3.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ilia Evdokimov 2026-11-11 10:06:10 Re: Fold NOT IN / <> ALL expressions containing NULL to FALSE
Previous Message vignesh C 2026-11-11 09:28:49 Re: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE)