Re: Another WaitEventSet resource leakage in back branches

2024-04-12 Thread Etsuro Fujita
Hi Andres, On Fri, Apr 12, 2024 at 1:29 AM Andres Freund wrote: > On 2024-03-22 21:15:45 +0900, Etsuro Fujita wrote: > > While working on [1], I noticed $SUBJECT: WaitLatchOrSocket in back > > branches is ignoring the possibility of failing partway through, too. > > I added a PG_FAINALLY block to

Re: Another WaitEventSet resource leakage in back branches

2024-04-11 Thread Andres Freund
Hi, On 2024-03-22 21:15:45 +0900, Etsuro Fujita wrote: > While working on [1], I noticed $SUBJECT: WaitLatchOrSocket in back > branches is ignoring the possibility of failing partway through, too. > I added a PG_FAINALLY block to that function, like commit 555276f85. > Patch attached. Could you e

Re: Another WaitEventSet resource leakage in back branches

2024-04-11 Thread Etsuro Fujita
On Fri, Apr 5, 2024 at 7:55 PM Etsuro Fujita wrote: > I am planning to back-patch these next week. Done. Best regards, Etsuro Fujita

Re: Another WaitEventSet resource leakage in back branches

2024-04-05 Thread Etsuro Fujita
eakage.patch Description: Binary data fix-another-WaitEventSet-resource-leakage-PG12.patch Description: Binary data

Another WaitEventSet resource leakage in back branches

2024-03-22 Thread Etsuro Fujita
Hi, While working on [1], I noticed $SUBJECT: WaitLatchOrSocket in back branches is ignoring the possibility of failing partway through, too. I added a PG_FAINALLY block to that function, like commit 555276f85. Patch attached. Best regards, Etsuro Fujita [1] https://www.postgresql.org/message-i

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

WaitEventSet resource leakage

2023-03-09 Thread Tom Lane
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 postgres_fdw's fault though, > but that of ExecAppendAsyncEventWait, which is i