Re: WAL segment file descriptor leak on read errors can PANIC the server

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Subject: Re: WAL segment file descriptor leak on read errors can PANIC the server
Date: 2026-10-08 03:13:39
Message-ID: ascKY-eTBDe_nM2P@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 07, 2026 at 11:34:40AM -0700, Bharath Rupireddy wrote:
> I addressed Bertrand's review comments. I renamed the reset callback
> to keep it generic (closing the open WAL segment file is one cleanup
> that could be done here but it could be extended for any other
> resources held by XLogReader). I adjusted the comments. I like the
> comment around segment_close on not throwing errors, although the core
> callbacks inherently follow that (they ignore errors from close()),
> it's good to have it. I ran pgindent and tests. I wrote the commit
> message.

Sounds fine to me code-wise. Applied on HEAD after more review and a
few tweaks.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-10-08 03:25:50 Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation
Previous Message Bharath Rupireddy 2026-10-08 02:47:32 Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers