From: Tom Lane <tgl@sss.pgh.pa.us>
To: dmigowski@ikoffice.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15923: Prepared statements take way too much memory.
Date: Wed, 24 Jul 2019 18:23:45 -0400
Message-ID: <3422.1564007025@sss.pgh.pa.us> (raw)
In-Reply-To: <15923-4b35496c683c52d2@postgresql.org>
References: <15923-4b35496c683c52d2@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Prepared Statements take too much memory.
I'm not really sure what you expect us to do about this. If you
PREPARE a bunch of statements and never DEALLOCATE them, then yes
they're going to consume memory; maybe a lot of memory if the
plans are complex.
The only thing we could do to reduce the memory consumption is to
throw away the plans, which kind of defeats the purpose of a
prepared statement, wouldn't you say? And even holding onto enough
information to re-create the plan later would consume some amount
of memory, so you will still have a problem if you keep making
prepared statements and never release them.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dmigowski@ikoffice.de
Subject: Re: BUG #15923: Prepared statements take way too much memory.
In-Reply-To: <3422.1564007025@sss.pgh.pa.us>
References: <15923-4b35496c683c52d2@postgresql.org> <3422.1564007025@sss.pgh.pa.us>
* 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