From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix minor thread handle leak in pg_test_fsync on Windows
Date: Thu, 15 Oct 2026 09:35:27 +0000
Message-ID: <E1xHHrz-00000001iag-2Pzm@gemulon.postgresql.org> (raw)
Fix minor thread handle leak in pg_test_fsync on Windows
START_TIMER launches a new thread, but never closed the handle to it.
We don't need the handle after starting the thread, so just close it
right away. The program creates a timer for each benchmark phase, so
this isn't a big leak at the moment, but it could become more serious
if someone added START_TIMER to a loop. I didn't bother backpatching
though.
Author: Harrison Booth <harrisontbooth@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAAH-eSVFy2GySdYEAtd9Wp=Swka0TzZGkw2VrO8GTaq3ndcikQ@mail.gmail...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/aa7b9cf132b013a4061e61c4393164f31d4f6930
Modified Files
--------------
src/bin/pg_test_fsync/pg_test_fsync.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Fix minor thread handle leak in pg_test_fsync on Windows
In-Reply-To: <E1xHHrz-00000001iag-2Pzm@gemulon.postgresql.org>
References: <E1xHHrz-00000001iag-2Pzm@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