Hi,
On Thu, Oct 08, 2026 at 12:13:39PM +0900, Michael Paquier wrote:
> 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.
Thanks!
As mentioned upthread [1], I think XLogReaderFree() should also check whether
seg.ws_file >= 0.
Please find attached a small patch doing that.
[1]: https://postgr.es/m/asNr203eue0R4zpZ@bdtpg
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com