Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id CEBDE9FB3B9 for ; Wed, 25 Oct 2006 19:50:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 03280-04-3 for ; Wed, 25 Oct 2006 22:49:50 +0000 (UTC) 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 954A69FA5D3 for ; Wed, 25 Oct 2006 19:49:50 -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 k9PMnmcQ005930; Wed, 25 Oct 2006 18:49:48 -0400 (EDT) To: "Joshua Marsh" cc: pgsql-admin@postgresql.org Subject: Re: CLUSTER using more memory than expected In-reply-to: <38242de90610250913s119e84c6rcf167edd74eadd60@mail.gmail.com> References: <38242de90610250913s119e84c6rcf167edd74eadd60@mail.gmail.com> Comments: In-reply-to "Joshua Marsh" message dated "Wed, 25 Oct 2006 10:13:59 -0600" Date: Wed, 25 Oct 2006 18:49:48 -0400 Message-ID: <5929.1161816588@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/167 X-Sequence-Number: 23470 "Joshua Marsh" writes: > The CLUSTER function seems to be using more memory than I expect. CLUSTER will eat maintenance_work_mem during index rebuilds --- more or less. You shouldn't expect these numbers to be dead on, particularly not in older releases. It looks like your 2Gb spec has turned into 3.6Gb actually eaten, which is a bit sloppier accounting than I'd like but not overly surprising. (FWIW, I think CVS HEAD is better than 8.0 at measuring sort workspace.) regards, tom lane