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 A00E6563FB for ; Wed, 16 Mar 2005 00:06:53 +0000 (GMT) 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 73575-07 for ; Wed, 16 Mar 2005 00:06:45 +0000 (GMT) Received: from sunsite.dcc.uchile.cl (sunsite.dcc.uchile.cl [192.80.24.2]) by svr1.postgresql.org (Postfix) with ESMTP id C173A564B6 for ; Wed, 16 Mar 2005 00:06:43 +0000 (GMT) Received: from anakena.dcc.uchile.cl (anakena [192.80.24.6]) by sunsite.dcc.uchile.cl (8.12.11/8.12.11) with ESMTP id j2G06Tjq019309; Tue, 15 Mar 2005 20:06:29 -0400 (CLT) Received: by anakena.dcc.uchile.cl (Postfix, from userid 4151) id D2FD15236D; Tue, 15 Mar 2005 20:06:29 -0400 (CLT) Date: Tue, 15 Mar 2005 20:06:29 -0400 From: Alvaro Herrera To: Tom Lane Cc: Robert Treat , Richard Huxton , Tambet Matiisen , pgsql-performance@postgresql.org Subject: Re: One tuple per transaction Message-ID: <20050316000629.GB17051@dcc.uchile.cl> References: <4236ACE5.1040004@archonet.com> <200503151652.30266.xzilla@users.sourceforge.net> <818.1110930679@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <818.1110930679@sss.pgh.pa.us> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.35 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200503/313 X-Sequence-Number: 11018 On Tue, Mar 15, 2005 at 06:51:19PM -0500, Tom Lane wrote: > Robert Treat writes: > > On a similar note I was just wondering if it would be possible to > > mark any of these dead tuples as ready to be reused at transaction > > commit time, since we know that they are dead to any and all other > > transactions currently going on. > > I believe VACUUM already knows that xmin = xmax implies the tuple > is dead to everyone. Huh, that is too simplistic in a subtransactions' world, isn't it? One way to solve this would be that a transaction that kills a tuple checks whether it was created by itself (not necessarily the same Xid), and somehow report it to the FSM right away. That'd mean physically moving a lot of tuples in the page, so ISTM it's too expensive an "optimization." Oh, and also delete the tuple from indexes. -- Alvaro Herrera () "Vivir y dejar de vivir son soluciones imaginarias. La existencia está en otra parte" (Andre Breton)