Re: [HACKERS] SELECT * FROM LIMIT 1; is really slow

Thu, 27 May 2004 14:07:41 -0700

On Thu, May 27, 2004 at 09:52:30PM +0200, Manfred Koizar wrote:

> I have no clear explanation at the moment, just some fuzzy ideas that
> are beginning to crystallise.  I'm messing around with heap tuple
> headers again, and the Xvac field seems to get in the way, unless I can
> cut down the number of different scenarios where it is needed.

Now you are on the subject, can I ask you to take a peek at what I did
regarding tuple headers?

At first I thought I'd have to add back Xmax as a field on its own, but
later (in chat with Bruce) I arrived to the conclusion that it isn't
really necessary, and I only added a bit to the infomask to flag when
the Cmin is overridden with Xmax.

However I'm not convinced that this is enough --- is there a situation
on which we should need to peek at Cmin after setting Xmax for a
particusar tuple?

The problem was

BEGIN;
        insert into foo values (1)
        begin
                delete from foo
        rollback
        -- at this point the tuple shold be visible,
        -- but it has my Xid as Xmin and Cmin was 
        -- overriden with Xmax
commit

I'd appreciate your (Manfred's and Tom's) comments on the topic.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"And as an added bonus, now my computer goes to the toilet for me, leaving me
free to spend time on more useful activities! yay slug codefests!" (C. Parker)


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to