Re: WAL segment file descriptor leak on read errors can PANIC the server - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: WAL segment file descriptor leak on read errors can PANIC the server
Date
Msg-id ascKY-eTBDe_nM2P@paquier.xyz
Whole thread
In response to Re: WAL segment file descriptor leak on read errors can PANIC the server  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: WAL segment file descriptor leak on read errors can PANIC the server
List 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

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers
Next
From: shveta malik
Date:
Subject: Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation