Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 9118F2E002D for ; Fri, 2 May 2008 16:30:44 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 57134-09 for ; Fri, 2 May 2008 16:30:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.226]) by developer.postgresql.org (Postfix) with ESMTP id 8D9C52E0031 for ; Fri, 2 May 2008 16:30:40 -0300 (ADT) Received: by qb-out-0506.google.com with SMTP id o12so2342396qba.17 for ; Fri, 02 May 2008 12:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=tI22moifJS1L/jZMny+ih8Yd2ljTKy4rpyasswqgELY=; b=iq2HezdX1Bq/kWUYF1Dm9bCzUSt70RcWbItIon7SnwKQa5cH3+wG5MJX4A8J6m+9W7TQUqqtg4GtEX9oxeac2k4yLTqXC+IAMMscOAuED+tGZGgiodi+5up8AKKH9DmwBbqd8hCgPVQ8hajjqwUNEYDRrQ+QgTPnivrGZokgzBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nE5mAq/DWJY7EzqW/KKOLLHzzGa/wi4xp0Aw0fnWyYzfH+Khgkac1k+OeRfuKdsZfCAKOMhJIhpStz30jmbJQHUH/OJiFcNVBTs/qRSZQRqIBBxa0UbDnPZIcEjk9FijYDTb4Qiqu6+RSCRQCTC6YQjvEO4qXIGXM7Z7/gkxiI8= Received: by 10.115.54.1 with SMTP id g1mr3348943wak.136.1209756638117; Fri, 02 May 2008 12:30:38 -0700 (PDT) Received: by 10.114.137.7 with HTTP; Fri, 2 May 2008 12:30:38 -0700 (PDT) Message-ID: Date: Fri, 2 May 2008 13:30:38 -0600 From: "Scott Marlowe" To: "Alexy Khrabrov" Subject: Re: two memory-consuming postgres processes Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/20 X-Sequence-Number: 29988 On Fri, May 2, 2008 at 1:24 PM, Alexy Khrabrov wrote: > Greetings -- I have an UPDATE query updating a 100 million row table, and > allocate enough memory via shared_buffers=1500MB. However, I see two > processes in top, the UPDATE process eating about 850 MB and the writer > process eating about 750 MB. The box starts paging. Why is there the > writer taking almost as much space as the UPDATE, and how can I shrink it? Shared_buffers is NOT the main memory pool for all operations in pgsql, it is simply the buffer pool used to hold data being operated on. Things like sorts etc. use other memory and can exhaust your machine. However, I'd like to see the output of vmstat 1 or top while this is happening. How much memory does this machine have?