From: | "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at> |
---|---|
To: | "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> |
Cc: | "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Hannu Krosing" <hannu(at)skype(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>, "Pavan Deolasee" <pavan(dot)deolasee(at)enterprisedb(dot)com>, "Nikhil S" <nikhil(dot)sontakke(at)enterprisedb(dot)com> |
Subject: | Re: HOT for PostgreSQL 8.3 |
Date: | 2007-02-22 16:22:34 |
Message-ID: | E1539E0ED7043848906A8FF995BDA57901CAF709@m0143.s-mxs.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > > Yes, thats one option. Though given a choice I would waste four
> > > bytes in the heap-page than inserting a new index entry.
> >
> > No question about that. My point was, that it would mean wasting the
2
> > (2 must be enough for a slot pointer) bytes on every heap tuple, hot
> > or not. And then the decision is not so obvious anymore.
> > If you don't have the room for the back pointer on every slot, there
> > is no room to add one later.
> >
> >
> Oh yes, I agree. I was referring to the idea of line pointer
> redirection which would waste four bytes (for the root line
> pointer) per hot-update chain. That occurs only when a tuple
> is hot-updated.
> So there is no overhead for normal tuples.
I think you are still misunderstanding me, sorry if I am not beeing
clear
enough. When the row is hot-updated it is too late. You do not have room
in the root for the line pointer.
Say a table's tuple size is typically 40 bytes. Your root slot has room
for exactly 40 bytes. When the new tuple also (as expected) needs 40
bytes
there is no room for the line pointer.
Or are you suggesting, that vacuum resizes all root tuples to make room
for
the extra bytes, and only then you can use it ? Imho that would not be
good.
Imho the "relink root to newest dead tuple during update" path is more
promising, and does not depend on vacuum.
If we do reuse dead tuples without vacuum we should probably, as already
suggested,
disconnect the "what is dead enough for reuse/vacuum" from global xmin
right from the
start.
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas ADI SD | 2007-02-22 16:30:24 | Re: Column storage positions |
Previous Message | Markus Schiltknecht | 2007-02-22 16:20:55 | Re: tsearch in core patch, for inclusion |