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 B551252849 for ; Thu, 16 Jun 2005 16:28:41 -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 28931-02 for ; Thu, 16 Jun 2005 19:28:40 +0000 (GMT) Received: from smtp-out-02.utu.fi (smtp-out-02.utu.fi [130.232.202.172]) by svr1.postgresql.org (Postfix) with ESMTP id 3DA935283C for ; Thu, 16 Jun 2005 16:28:39 -0300 (ADT) Received: from izar.utu.fi (mailhost.utu.fi [130.232.1.5]) by smtp02.mess.utu.fi (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0II60030XZFOV5F0@smtp02.mess.utu.fi> for pgsql-performance@postgresql.org; Thu, 16 Jun 2005 22:28:36 +0300 (EEST) Received: from [192.168.1.51] (mcinen-dsl.utu.fi [130.232.39.52]) by izar.utu.fi (Postfix) with ESMTP id AE4F02CB83 for ; Thu, 16 Jun 2005 22:28:35 +0300 (EET DST) Date: Thu, 16 Jun 2005 22:28:30 +0300 From: =?ISO-8859-1?Q?Veikko_M=E4kinen?= Subject: How does the transaction buffer work? To: pgsql-performance@postgresql.org Message-id: <42B1D2DE.4020709@ecom.fi> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/339 X-Sequence-Number: 12976 Hey, How does Postgres (8.0.x) buffer changes to a database within a transaction? I need to insert/update more than a thousand rows (mayde even more than 10000 rows, ~100 bytes/row) in a table but the changes must not be visible to other users/transactions before every row is updated. 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? Will this cause performance issues on a heavily loaded server with too little memory even to begin with :) -veikko