Re: Unlimited memory consumption with long-lived connection - Mailing list pgsql-bugs

From Duncan Sands
Subject Re: Unlimited memory consumption with long-lived connection
Date
Msg-id 5989ffab-a824-e029-3f09-fa578593023a@deepbluecap.com
Whole thread Raw
In response to Re: Unlimited memory consumption with long-lived connection  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-bugs
Hi Justin,

>>> PS: The testcase was reduced from a script that kept a connection open for a
>>> long time in order to LISTEN, and would execute a query using the same
>>> connection every time there was a notification on the channel.  It consumed ever
>>> more memory to the point of crashing the postgresql server.  Changing the script
>>> to perform the query using a new short-lived connection was an effective workaround.
> 
> It sounds like the same as the issue here:
> https://wiki.postgresql.org/wiki/PostgreSQL_13_Open_Items

I agree that it is likely the same issue.

> There are patches proposed here, which fixed the issue for me.
> But I've always been suspicious that there may be a 2nd, undiagnosed
> issue lurking behind this one...
> https://www.postgresql.org/message-id/20210417021602.7dilihkdc7oblrf7%40alap3.anarazel.de

Thanks.  Since those patches are just a workaround, and I already worked around 
it, I don't plan to give them a whirl.  On the other hand, if Andres ever gets 
round to implementing approach (1) from 
https://www.postgresql.org/message-id/20210417021602.7dilihkdc7oblrf7@alap3.anarazel.de 
then I'd be happy to give it a whirl.  I'm rusty now but I used to be quite 
expert in LLVM, so I might even be able to do some patch review.

Best wishes, Duncan.



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_dump: error
Next
From: Andres Freund
Date:
Subject: Re: Unlimited memory consumption with long-lived connection