pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: g.vanluffelen@qipc.com
To: pgsql-hackers@postgreSQL.org
Subject: Re: [BUGS] BUG #8573: int4range memory consumption
Date: Fri, 01 Nov 2013 20:17:00 -0400
Message-ID: <11501.1383351420@sss.pgh.pa.us> (raw)
In-Reply-To: <18832.1383332908@sss.pgh.pa.us>
References: <E1VcC7Y-0006Tl-He@wrigleys.postgresql.org>
	<18832.1383332908@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

I wrote:
> It's possible that this would result in some net slowdown in tuple output;
> but it's also possible that eliminating the retail pfree's in favor of a
> single context reset per tuple would make for a net savings.  In any case,
> we're already using a reset-per-row approach to memory management of
> output function calls in COPY OUT, and I know for a fact that we've
> squeezed that code path as hard as we could.

It appears that indeed, the reset-per-row approach is marginally faster
than the existing code.  It's just barely faster with a couple of columns
of output, for instance I get about 660 vs 665 msec for
   select x,x from generate_series(1,1000000) x;
but the advantage grows for more columns, which is expected since we're
getting rid of more pfree's.  With ten integer columns I see 1650 vs
1710 msec, for example.

So I see no downside to fixing it like this, and will work on a complete
patch.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (12+ messages)  latest in thread

Message-ID: <11501.1383351420@sss.pgh.pa.us>
Permalink:  ../11501.1383351420@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11501.1383351420@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 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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, g.vanluffelen@qipc.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [BUGS] BUG #8573: int4range memory consumption
  In-Reply-To: <11501.1383351420@sss.pgh.pa.us>
  References: <E1VcC7Y-0006Tl-He@wrigleys.postgresql.org> <18832.1383332908@sss.pgh.pa.us> <11501.1383351420@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