pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: luben karavelov <karavelov@mail.bg>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6763: Severe memory leak with arrays and hstore
Date: Fri, 27 Jul 2012 11:22:14 +0800
Message-ID: <50120966.4030903@ringerc.id.au> (raw)
In-Reply-To: <5011FDEE.1010008@ringerc.id.au>
References: <E1SuCw0-0007s2-5D@wrigleys.postgresql.org>
	<5010FD0F.4020400@ringerc.id.au>
	<10398EEF-03DE-405E-B276-06F73ABF9E3A@mail.bg>
	<5011FD5D.3040503@ringerc.id.au>
	<5011FDEE.1010008@ringerc.id.au>

OK, it's certainly leaking, but not in the same drastic way I was able 
to reproduce manually a couple of times earlier. Self-contained test 
case attached.

$ bash hstore-leak-demo.sh
NOTICE:  extension "hstore" already exists, skipping
CREATE EXTENSION
DROP TABLE
CREATE TABLE
CREATE TABLE
INSERT 0 100000
INSERT 0 80014
INSERT 0 72434
INSERT 0 50340
INSERT 0 30077
         avg         | max
--------------------+-----
  3.3286500000000000 |  21
(1 row)

Backend PID is: 4823
                  USER       PID %CPU %MEM    VSZ   RSS TTY STAT START   
TIME COMMAND
Before first     postgres  4823  0.0  0.0 504276  4312 ? Ss   11:19   
0:00 postgres: craig regress [local] idle
Iteration 1      postgres  4823  0.0  0.3 536908 25416 ? Rs   11:19   
0:00 postgres: craig regress [local] INSERT
Iteration 2      postgres  4823 33.0 13.1 2163384 1056560 ? Rs   11:19   
0:00 postgres: craig regress [local] INSERT
Iteration 3      postgres  4823 56.0 13.3 2163408 1072300 ? Rs   11:19   
0:01 postgres: craig regress [local] INSERT
Iteration 4      postgres  4823 58.7 13.4 2163408 1084936 ? Rs   11:19   
0:02 postgres: craig regress [local] INSERT
Iteration 20     postgres  4823 85.3 14.3 2173776 1156784 ? Rs   11:19   
0:13 postgres: craig regress [local] INSERT
Iteration 40     postgres  4823 92.0 16.3 2176848 1314700 ? Rs   11:19   
0:28 postgres: craig regress [local] INSERT
Iteration 60     postgres  4823 94.1 16.4 2173776 1322208 ? Rs   11:19   
0:43 postgres: craig regress [local] INSERT
Iteration 80     postgres  4823 96.0 16.4 2173776 1323768 ? Rs   11:19   
0:58 postgres: craig regress [local] INSERT
Iteration 100    postgres  4823 95.7 16.5 2176848 1329880 ? Rs   11:19   
1:14 postgres: craig regress [local] INSERT
Iteration 120    postgres  4823 97.1 16.4 2176848 1329132 ? Rs   11:19   
1:31 postgres: craig regress [local] INSERT
Iteration 140    postgres  4823 96.8 16.4 2176848 1329524 ? Rs   11:19   
1:48 postgres: craig regress [local] INSERT

Attachments:

  hstore-leak-demo.sh (application/x-shellscript, 2.1K) download

view thread (15+ messages)  latest in thread

Message-ID: <50120966.4030903@ringerc.id.au>
Permalink:  ../50120966.4030903@ringerc.id.au/
Also on:    postgresql.org/message-id/50120966.4030903@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: <50120966.4030903@ringerc.id.au>
  References: <E1SuCw0-0007s2-5D@wrigleys.postgresql.org> <5010FD0F.4020400@ringerc.id.au> <10398EEF-03DE-405E-B276-06F73ABF9E3A@mail.bg> <5011FD5D.3040503@ringerc.id.au> <5011FDEE.1010008@ringerc.id.au> <50120966.4030903@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