From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add missing FreeDir() in CheckTablespaceDirectory()
Date: Wed, 14 Oct 2026 02:13:36 +0000
Message-ID: <E1xGoUq-00000001Wdt-1IAD@gemulon.postgresql.org> (raw)
Add missing FreeDir() in CheckTablespaceDirectory()
CheckTablespaceDirectory() did not close the directory opened with
AllocateDir(), leaving its resources held during subsequent recovery,
potentially indefinitely on a standby. Add the missing FreeDir() call.
Backpatch to all supported versions.
Author: Chao Li <lic@highgo.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/66A784B7-55C1-4613-8C24-B4C2A8D75414@gmail.com
Backpatch-through: 14
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b128e75ecc6b09f04cf6e105dd77700f586a9167
Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 1 +
1 file changed, 1 insertion(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Add missing FreeDir() in CheckTablespaceDirectory()
In-Reply-To: <E1xGoUq-00000001Wdt-1IAD@gemulon.postgresql.org>
References: <E1xGoUq-00000001Wdt-1IAD@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox