X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 12AA752824 for ; Thu, 16 Jun 2005 18:51:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 58237-01 for ; Thu, 16 Jun 2005 21:51:44 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 00A6F5282C for ; Thu, 16 Jun 2005 18:51:43 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO temoku.sf.agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7493771; Thu, 16 Jun 2005 14:53:51 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Veikko =?iso-8859-1?q?M=E4kinen?= Subject: Re: How does the transaction buffer work? Date: Thu, 16 Jun 2005 14:53:36 -0700 User-Agent: KMail/1.8 Cc: pgsql-performance@postgresql.org References: <42B1D2DE.4020709@ecom.fi> In-Reply-To: <42B1D2DE.4020709@ecom.fi> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506161453.37194.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.045 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/343 X-Sequence-Number: 12980 Veikko, > One way of doing this that I thought of was start a > transaction, delete everything and then just dump new data in (copy > perhaps). The old data would be usable to other transactions until I > commit my insert. This would be the fastest way, but how much memory > would this use? Starting a transaction doesn't use any more memory than without one. Unlike Some Other Databases, PostgreSQL's transactions occur in WAL and on data pages, not in RAM. > Will this cause performance issues on a heavily loaded > server with too little memory even to begin with :) Quite possibly, but the visibility issue won't be the problem. -- --Josh Josh Berkus Aglio Database Solutions San Francisco