Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 3B4432E005D for ; Fri, 2 May 2008 19:31:16 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 99058-01 for ; Fri, 2 May 2008 19:31:03 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by developer.postgresql.org (Postfix) with ESMTP id 66F9C2E00A0 for ; Fri, 2 May 2008 19:03:51 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so1022551rvf.43 for ; Fri, 02 May 2008 15:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=0d6SthBD0wJvBpjAzBLEVwwzurS8n5DD4Z2ZMT1W04E=; b=hGA10zABx9gz+sMnCBrEGdmD6UK/NHhL2Oxyv8/ulyVpVjBNijBL1rFlxjhpQ993KQJrwPpohcCDFxRaUYA6ZnDjPc8skchhrFvCUfUfr1KJ/F3Dykn2f24U/YOAV09X3Qx7K/8KJpivSqrAKNMGqN51spYMlNRfWpyI9q2Za6Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=X29t3KXsgV/qIHR+GxkO8R/bxhJpKS+q7Dr1LXnFKRhQd5mtLj681iQ+8C9tUh90qIiVx0F1PlDMVmQlFG56fuQZdsCedkxJgOJ1pevpxPDLmzWjrxCcfua+MRhUm3WbfrF/1tckmyGPbS4Q8sFkHNZ/Bu46FTALPT5pkISlg4A= Received: by 10.141.29.14 with SMTP id g14mr1563554rvj.241.1209765830572; Fri, 02 May 2008 15:03:50 -0700 (PDT) Received: from ?10.0.1.17? ( [75.92.142.184]) by mx.google.com with ESMTPS id f42sm4893435rvb.5.2008.05.02.15.03.46 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 May 2008 15:03:49 -0700 (PDT) Cc: "Greg Smith" , Message-Id: From: Alexy Khrabrov To: "Kevin Grittner" In-Reply-To: <481B44AF.EE98.0025.0@wicourts.gov> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: two memory-consuming postgres processes Date: Fri, 2 May 2008 15:03:12 -0700 References: <27A4D379-2553-496D-A96C-102F2A5E62C2@gmail.com> <21403.1209759217@sss.pgh.pa.us> <72E02D29-848B-467A-AE6B-401568010254@gmail.com> <481B8160.2090106@emolecules.com> <1F7A4C3D-C8A3-44BC-A324-E9BA409BB479@gmail.com> <481B44AF.EE98.0025.0@wicourts.gov> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200805/39 X-Sequence-Number: 30007 On May 2, 2008, at 2:43 PM, Kevin Grittner wrote: >>>> Alexy Khrabrov wrote: > >> SInce I don't index on that >> new column, I'd assume my old indices would do -- do they change >> because of rows deletions/insertions, with the effective new rows >> addresses? > > Every update is a delete and insert. The new version of the row must > be added to the index. Every access through the index then has to > look at both versions of the row to see which one is "current" for its > transaction. Vacuum will make the space used by the dead rows > available for reuse, as well as removing the old index entries and > making that space available for new index entries. OK. I've cancelled all previous attempts at UPDATE and will now create some derived tables. See no changes in the previous huge table -- the added column was completely empty. Dropped it. Should I vacuum just in case, or am I guaranteed not to have any extra rows since no UPDATE actually went through and none are showing? Cheers, Alexy