Re: BUG #6763: Severe memory leak with arrays and hstore

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: luben karavelov <karavelov(at)mail(dot)bg>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6763: Severe memory leak with arrays and hstore
Date: 2012-07-27 03:22:14
Message-ID: 50120966.4030903@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Attachment Content-Type Size
hstore-leak-demo.sh application/x-shellscript 2.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-07-27 05:47:05 Re: BUG #6763: Severe memory leak with arrays and hstore
Previous Message Craig Ringer 2012-07-27 02:33:18 Re: BUG #6763: Severe memory leak with arrays and hstore