X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E2DD29FA5BE for ; Mon, 5 Jun 2006 12:27:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 22053-08 for ; Mon, 5 Jun 2006 12:27:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 2E3B99FA111 for ; Mon, 5 Jun 2006 12:27:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k55FRU2c020513; Mon, 5 Jun 2006 11:27:31 -0400 (EDT) To: "Jim C. Nasby" cc: Zoltan Boszormenyi , pgsql-hackers@postgresql.org Subject: Re: [PERFORM] psql -A (unaligned format) eats too much memory In-reply-to: <20060605152258.GT53487@pervasive.com> References: <44835834.2020309@dunaweb.hu> <44835F86.5040008@dunaweb.hu> <20060605152258.GT53487@pervasive.com> Comments: In-reply-to "Jim C. Nasby" message dated "Mon, 05 Jun 2006 10:22:59 -0500" Date: Mon, 05 Jun 2006 11:27:30 -0400 Message-ID: <20512.1149521250@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/157 X-Sequence-Number: 84390 "Jim C. Nasby" 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? 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. regards, tom lane