From: Duncan Sands <duncan.sands@deepbluecap.com>
To: Justin Pryzby <pryzby@telsasoft.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-bugs@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Subject: Re: Unlimited memory consumption with long-lived connection
Date: Wed, 22 Feb 2023 18:10:25 +0100
Message-ID: <5989ffab-a824-e029-3f09-fa578593023a@deepbluecap.com> (raw)
In-Reply-To: <20230222145341.GT1653@telsasoft.com>
References: <a53cacb0-8835-57d6-31e4-4c5ef196de1a@deepbluecap.com>
<7484b4bd-a808-ed9e-892c-933f7f24120f@iki.fi>
<20230222145341.GT1653@telsasoft.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: duncan.sands@deepbluecap.com, pryzby@telsasoft.com, hlinnaka@iki.fi, andres@anarazel.de
Subject: Re: Unlimited memory consumption with long-lived connection
In-Reply-To: <5989ffab-a824-e029-3f09-fa578593023a@deepbluecap.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox