From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dawn Hollingsworth <dmh@airdefense.net>
Cc: pgsql-performance@postgresql.org, Ben Scherrey <scherrey@proteus-tech.com>
Subject: Re: Postgres Connections Requiring Large Amounts of Memory
Date: Tue, 17 Jun 2003 15:38:02 -0400
Message-ID: <14875.1055878682@sss.pgh.pa.us> (raw)
In-Reply-To: <1055832411.5467.100.camel@kaos>
References: <1055752337.2182.49.camel@kaos>
<6634.1055796302@sss.pgh.pa.us>
<1055753856.5467.57.camel@kaos>
<6892.1055799269@sss.pgh.pa.us>
<1055832411.5467.100.camel@kaos>
Dawn Hollingsworth <dmh@airdefense.net> writes:
> I attached gdb to a connection using just over 400MB( according to top)
> and ran "MemoryContextStats(TopMemoryContext)"
Hmm. This only seems to account for about 5 meg of space, which means
either that lots of space is being used and released, or that the leak
is coming from direct malloc calls rather than palloc. I doubt the
latter though; we don't use too many direct malloc calls.
On the former theory, could it be something like updating a large
number of tuples in one transaction in a table with foreign keys?
The pending-triggers list could have swelled up and then gone away
again.
The large number of SPI Plan contexts seems a tad fishy, and even more
so the fact that some of them are rather large. They still only account
for a couple of meg, so they aren't directly the problem, but perhaps
they are related to the problem. I presume these came from either
foreign-key triggers or something you've written in PL functions. Can
you tell us more about what you use in that line?
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, dmh@airdefense.net, scherrey@proteus-tech.com
Subject: Re: Postgres Connections Requiring Large Amounts of Memory
In-Reply-To: <14875.1055878682@sss.pgh.pa.us>
References: <1055752337.2182.49.camel@kaos> <6634.1055796302@sss.pgh.pa.us> <1055753856.5467.57.camel@kaos> <6892.1055799269@sss.pgh.pa.us> <1055832411.5467.100.camel@kaos> <14875.1055878682@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