Re: Avoid handle leak (src/bin/pg_ctl/pg_ctl.c) - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Avoid handle leak (src/bin/pg_ctl/pg_ctl.c)
Date
Msg-id AB023E38-8014-425B-A208-94BBE72F95E6@yesql.se
Whole thread Raw
In response to Re: Avoid handle leak (src/bin/pg_ctl/pg_ctl.c)  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
On 24 Oct 2025, at 14:40, Ranier Vilela <ranier.vf@gmail.com> wrote:
Em sex., 24 de out. de 2025 às 09:24, Álvaro Herrera <alvherre@kurilemu.de> escreveu:

Hmm?  That makes no sense.  Do you have references to documentation that
says the system works the way you claim?
There are a bunch of messages on the web.
Some are:
"insufficient system resources exist to complete the requested service"

None of the these links back up the claim that exit() wont release resources
under Windows.  The "Terminating a Process" article on MSDN does however have
this to say about the subject:

   Terminating a process has the following results:

   * Any remaining threads in the process are marked for termination.
   * Any resources allocated by the process are freed.
   * All kernel objects are closed.
   * The process code is removed from memory.
   * The process exit code is set.
   * The process object is signaled.

--
Daniel Gustafsson

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array
Next
From: Daniel Gustafsson
Date:
Subject: Re: Unused variable in perl test