Re: One tuple per transaction - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: One tuple per transaction
Date
Msg-id 20050316000629.GB17051@dcc.uchile.cl
Whole thread Raw
In response to Re: One tuple per transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: One tuple per transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Tue, Mar 15, 2005 at 06:51:19PM -0500, Tom Lane wrote:
> Robert Treat <xzilla@users.sourceforge.net> 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 (<alvherre[@]dcc.uchile.cl>)
"Vivir y dejar de vivir son soluciones imaginarias.
La existencia está en otra parte" (Andre Breton)

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: One tuple per transaction
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Changing the random_page_cost default (was: cpu_tuple_cost)