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

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

On Mon, Oct 05, 2026 at 10:59:16AM +0100, Alexandre Felipe wrote:
> BasicOpenFile() called repeatedly will accumulate stale descriptors
> indefinitely.

I don't really see a reason to care about this kind of complexity in
the scope of xlogreader.h: XLogReaderState.WALOpenSegment.ws_file is
the only fd that we need to track.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-10-05 22:26:46 Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation
Previous Message surya poondla 2026-10-05 21:52:55 Re: Limiting WAL retained for archiving, like max_slot_wal_keep_size