Re: [GENERAL] huge backend processes - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] huge backend processes
Date
Msg-id 199908182024.QAA08851@candle.pha.pa.us
Whole thread Raw
In response to huge backend processes  (jim@reptiles.org (Jim Mercer))
List pgsql-general
>
> maybe i'm doing something wrong here:
>
> CREATE TABLE samples
>   (
>   mark      abstime,
>   subnet    inet,
>   bytes_in  float8,
>   bytes_out float8
>   );
> CREATE INDEX samples_mark ON samples (mark);
>
> --- fill it with lots and lots of data
>
> BEGIN WORK;
> DECLARE mycurs CURSOR FOR
>    SELECT DATE_PART('epoch', mark), subnet, bytes_in, bytes_out

This is clearly a known problem.  We need a per-tuple memory context.
Function calls that return palloc'ed memory is not freed for each tuple.


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: jim@reptiles.org (Jim Mercer)
Date:
Subject: Re: [GENERAL] huge backend processes
Next
From: Dirk Lutzebaeck
Date:
Subject: Huge backends / self joins / long queries