Re: Memory usage on subselect - Mailing list pgsql-sql

From Tom Lane
Subject Re: Memory usage on subselect
Date
Msg-id 24527.1085329698@sss.pgh.pa.us
Whole thread Raw
In response to Memory usage on subselect  ("Alexander M. Pravking" <fduch@antar.bryansk.ru>)
Responses Re: Memory usage on subselect
List pgsql-sql
"Alexander M. Pravking" <fduch@antar.bryansk.ru> writes:
> I've got a memory usage problem when I try to do a subselect on the same
> table as the main select (PostgreSQL 7.3.4 on FreeBSD). Here's my query:
> ...
> The "services" table is indexed only on "id" column and has about a
> thousand tuples. sreq(integer, text, timestamptz) is a strict immutable
> function written in SQL.

IIRC, there were intraquery memory leaks associated with SQL-language
functions until fairly recently.  Can you try your problem case on 7.4?
Or see if you can rewrite the sreq function in plpgsql.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Alexander M. Pravking"
Date:
Subject: Memory usage on subselect
Next
From: "Alexander M. Pravking"
Date:
Subject: Re: Memory usage on subselect