pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Smith <sodgodofall@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance of aggregates over set-returning functions
Date: Tue, 8 Jan 2008 19:33:33 -0800
Message-ID: <b88f0d670801081933t6c7cc50ci896a94d7d9f7ec17@mail.gmail.com> (raw)
In-Reply-To: <25214.1199848043@sss.pgh.pa.us>
References: <b88f0d670801081821r70fb10b4j4c176eed96918434@mail.gmail.com>
	<25214.1199848043@sss.pgh.pa.us>

> > Interestingly though, when the range in the generate_series() was
> > small enough to fit in 4 bytes of memory (e.g.
> > generate_series(1,1000000000) ), the above query completed consuming
> > only negligible amount of memory. So, it looked like the aggregate
> > computation was being pipelined with the tuples returned from
> > generate_series().
>
> It's pipelined either way.  But int8 is a pass-by-reference data type,
> and it sounds like we have a memory leak for this case.

Thanks for your reply. How easy is it to fix this? Which portion of
the code should we look to change?

- John



view thread (9+ messages)  latest in thread

Message-ID: <b88f0d670801081933t6c7cc50ci896a94d7d9f7ec17@mail.gmail.com>
Permalink:  ../b88f0d670801081933t6c7cc50ci896a94d7d9f7ec17@mail.gmail.com/
Also on:    postgresql.org/message-id/b88f0d670801081933t6c7cc50ci896a94d7d9f7ec17@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: sodgodofall@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Performance of aggregates over set-returning functions
  In-Reply-To: <b88f0d670801081933t6c7cc50ci896a94d7d9f7ec17@mail.gmail.com>
  References: <b88f0d670801081821r70fb10b4j4c176eed96918434@mail.gmail.com> <25214.1199848043@sss.pgh.pa.us> <b88f0d670801081933t6c7cc50ci896a94d7d9f7ec17@mail.gmail.com>

* 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