Skip site navigation (1) Skip section navigation (2)

Re: [PERFORM] psql -A (unaligned format) eats too much memory

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zoltan Boszormenyi <zboszor(at)dunaweb(dot)hu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much memory
Date: 2006-06-05 15:53:49
Message-ID: 20060605155349.GU53487@pervasive.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
On Mon, Jun 05, 2006 at 11:27:30AM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> > I've been able to verify this on 8.1.4; psql -A -t -c 'SELECT * FROM
> > largetable' > /dev/null results in psql consuming vast quantities of
> > memory. Why is this?
> 
> Is it different without the -A?

Nope.

> I'm reading this as just another uninformed complaint about libpq's
> habit of buffering the whole query result.  It's possible that there's
> a memory leak in the -A path specifically, but nothing said so far
> provided any evidence for that.

Certainly seems like it. It seems like it would be good to allow for
libpq not to buffer, since there's cases where it's not needed...
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby(at)pervasive(dot)com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2006-06-05 16:00:35
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much memory
Previous:From: Tom LaneDate: 2006-06-05 15:27:30
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much memory

pgsql-hackers by date

Next:From: Teodor SigaevDate: 2006-06-05 15:58:02
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Previous:From: Tom LaneDate: 2006-06-05 15:27:30
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much memory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group