From: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
---|---|
To: | "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | AW: AW: Adding index flag showing tuple status |
Date: | 2001-05-18 15:55:34 |
Message-ID: | 11C1E6749A55D411A9670001FA6879633682D7@sdexcsrv1.f000.d0188.sd.spardat.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > > I am looking at adding an index tuple flag to indicate when a
> > > heap tuple is expired so the index code can skip looking up the heap tuple.
> > >
> > > The problem is that I can't figure out how be sure that the heap tuple
> > > doesn't need to be looked at by _any_ backend. Right now, we update the
> > > transaction commit flags in the heap tuple to prevent a pg_log lookup,
> > > but that is not enough because some transactions may still see that heap
> > > tuple as visible.
> >
> > If you are only marking those, that need not be visible anymore, can you not
> > simply delete that key (slot) from the index ? I know vacuum then shows a count
> > mismatch, but that could probably be accounted for.
>
> I wasn't going to delete it, just add a flag to index scans know they
> don't need to look at the heap table.
If it is only a flag, you would need to go to the same trouble that vacuum already
goes to (you cannot mark it if someone else is still interested in this snapshot).
Thus I do not see any benefit in adding a flag, versus deleting not needed keys.
To avoid the snapshot trouble you would need a xid (xmax or something), and that
is 4 bytes, and not a simple flag.
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-05-18 15:59:29 | Re: Running config vars |
Previous Message | Oleg Bartunov | 2001-05-18 15:45:46 | Re: Plans for solving the VACUUM problem |