pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: karavelov@mail.bg
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6763: Severe memory leak with arrays and hstore
Date: Thu, 26 Jul 2012 16:17:19 +0800
Message-ID: <5010FD0F.4020400@ringerc.id.au> (raw)
In-Reply-To: <E1SuCw0-0007s2-5D@wrigleys.postgresql.org>
References: <E1SuCw0-0007s2-5D@wrigleys.postgresql.org>

On 07/26/2012 09:32 AM, karavelov@mail.bg wrote:
> Finally I have managed to migrate it in batches of 100-200k user ids and
> disconnecting after each query in order to free the backend and leaked
> memory.
If you do it in batches, but you do NOT disconnect and reconnect, does 
the backend continue to grow?

What's the output of:

SELECT count(sub.user_id), to_char(AVG(sub.n_prefs), '99999.99') FROM (
SELECT user_id, count(name) AS n_prefs FROM old_prefs GROUP BY user_id) 
AS sub;

and

SELECT pg_size_pretty(pg_total_relation_size('old_prefs'));

?

--
Craig Ringer



view thread (15+ messages)  latest in thread

Message-ID: <5010FD0F.4020400@ringerc.id.au>
Permalink:  ../5010FD0F.4020400@ringerc.id.au/
Also on:    postgresql.org/message-id/5010FD0F.4020400@ringerc.id.au

 · 

reply

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: ringerc@ringerc.id.au, karavelov@mail.bg
  Subject: Re: BUG #6763: Severe memory leak with arrays and hstore
  In-Reply-To: <5010FD0F.4020400@ringerc.id.au>
  References: <E1SuCw0-0007s2-5D@wrigleys.postgresql.org> <5010FD0F.4020400@ringerc.id.au>

* 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