Re: WaitEventSet resource leakage
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Alexander Lakhin <exclusion@gmail.com>,
Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2023-11-23T11:35:16Z
Lists: pgsql-hackers
On 22/11/2023 15:00, Alexander Lakhin wrote: > I can also confirm that the patches proposed (for master and back branches) > eliminate WES leakage as expected. > > Thanks for the fix! > > Maybe you would find appropriate to add the comment > /* Convenience wrappers over ResourceOwnerRemember/Forget */ > above ResourceOwnerRememberWaitEventSet > just as it's added above ResourceOwnerRememberRelationRef, > ResourceOwnerRememberDSM, ResourceOwnerRememberFile, ... Added that and fixed the Windows warning that Thomas pointed out. Pushed the ResourceOwner version to master, and PG_TRY-CATCH version to 14-16. Thank you! > (As a side note, this fix doesn't resolve the issue #17828 completely, > because that large number of handles might be also consumed > legally.) :-( -- Heikki Linnakangas Neon (https://neon.tech)
Commits
-
Fix resource leak when a FDW's ForeignAsyncRequest function fails
- 555276f85940 14.11 landed
- 481d7d1c01c6 15.6 landed
- 501cfd07dac6 16.2 landed
-
Use ResourceOwner to track WaitEventSets.
- 50c67c2019ab 17.0 landed