pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander M. Pravking <fduch@antar.bryansk.ru>
Cc: pgsql-sql@postgresql.org
Subject: Re: Memory usage on subselect
Date: Sun, 23 May 2004 12:28:18 -0400
Message-ID: <24527.1085329698@sss.pgh.pa.us> (raw)
In-Reply-To: <20040522175419.GB54296@dyatel.antar.bryansk.ru>
References: <20040522175419.GB54296@dyatel.antar.bryansk.ru>

"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



view thread (7+ messages)  latest in thread

Message-ID: <24527.1085329698@sss.pgh.pa.us>
Permalink:  ../24527.1085329698@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24527.1085329698@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, fduch@antar.bryansk.ru
  Subject: Re: Memory usage on subselect
  In-Reply-To: <24527.1085329698@sss.pgh.pa.us>

* 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