Re: WaitEventSet resource leakage

2023-11-23 Thread Heikki Linnakangas
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

Re: WaitEventSet resource leakage

2023-11-22 Thread Alexander Lakhin
20.11.2023 00:09, Thomas Munro wrote: On Fri, Nov 17, 2023 at 12:22 AM Heikki Linnakangas wrote: And here is a patch to implement that on master. Rationale and code look good to me. I can also confirm that the patches proposed (for master and back branches) eliminate WES leakage as expect

Re: WaitEventSet resource leakage

2023-11-19 Thread Thomas Munro
On Fri, Nov 17, 2023 at 12:22 AM Heikki Linnakangas wrote: > On 16/11/2023 01:08, Tom Lane wrote: > > Heikki Linnakangas writes: > >> On 09/03/2023 20:51, Tom Lane wrote: > >>> After further thought that seems like a pretty ad-hoc solution. > >>> We probably can do no better in the back branches,

Re: WaitEventSet resource leakage

2023-11-16 Thread Heikki Linnakangas
On 16/11/2023 01:08, Tom Lane wrote: Heikki Linnakangas writes: On 09/03/2023 20:51, Tom Lane wrote: After further thought that seems like a pretty ad-hoc solution. We probably can do no better in the back branches, but shouldn't we start treating WaitEventSets as ResourceOwner-managed resourc

Re: WaitEventSet resource leakage

2023-11-15 Thread Tom Lane
Heikki Linnakangas writes: > On 09/03/2023 20:51, Tom Lane wrote: >> After further thought that seems like a pretty ad-hoc solution. >> We probably can do no better in the back branches, but shouldn't >> we start treating WaitEventSets as ResourceOwner-managed resources? >> Otherwise, transient Wa

Re: WaitEventSet resource leakage

2023-11-15 Thread Heikki Linnakangas
(Alexander just reminded me of this off-list) On 09/03/2023 20:51, Tom Lane wrote: In [1] I wrote: PG Bug reporting form writes: The following script: [ leaks a file descriptor per error ] Yeah, at least on platforms where WaitEventSets own kernel file descriptors. I don't think it's post