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 02:30:53
Message-ID: 5011FD5D.3040503@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi all

Here's a fully self contained, automated test case that demonstrates the
leak.

Example output on my system, pasted as quote to stop Thunderbird
mangling it:

> $ ./hstore-leak-demo.sh
> NOTICE: extension "hstore" already exists, skipping
> CREATE EXTENSION
> DROP TABLE
> CREATE TABLE
> CREATE TABLE
> INSERT 0 100000
> INSERT 0 80175
> INSERT 0 72267
> INSERT 0 50649
> INSERT 0 30430
> avg | max
> --------------------+-----
> 3.3352100000000000 | 20
> (1 row)
>
> Backend PID is: 3167
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 0.0 0.0 504276 4368 ? Ss 10:29 0:00 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 91.0 13.0 2163384 1055652 ? Ss 10:29 0:00 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 77.5 13.2 2163408 1071496 ? Ss 10:29 0:01 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 108 13.4 2163408 1084056 ? Ss 10:29 0:02 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 93.0 13.5 2163408 1092244 ? Ss 10:29 0:02 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 86.0 13.6 2163408 1100444 ? Ss 10:29 0:03 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 101 13.7 2163408 1108704 ? Ss 10:29 0:04 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 93.8 13.8 2163408 1116896 ? Ss 10:29 0:04 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 88.8 13.9 2163408 1125048 ? Ss 10:29 0:05 postgres: craig regress [local] idle
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> postgres 3167 99.1 14.0 2163408 1133228 ? Ss 10:29 0:05 postgres: craig regress [local] idle

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ringer 2012-07-27 02:31:26 Re: BUG #6763: Severe memory leak with arrays and hstore
Previous Message Craig Ringer 2012-07-27 01:00:36 Re: BUG #6763: Severe memory leak with arrays and hstore