From: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
---|---|
To: | Gokulakannan Somasundaram <gokul007(at)gmail(dot)com> |
Cc: | Gregory Stark <stark(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Visibility map thoughts |
Date: | 2007-11-06 14:54:22 |
Message-ID: | 4730801E.50804@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Gokulakannan Somasundaram wrote:
> On Nov 6, 2007 4:33 PM, Heikki Linnakangas <heikki(at)enterprisedb(dot)com> wrote:
>> Gokulakannan Somasundaram wrote:
>>> Just one more thought on the same. This implementation also assumes
>>> that there won't be any update chains across pages, which is the
>>> current stage.
>> No, it doesn't assume that.
>
> Say, if there is a tuple, which is visible to everyone, the Vacuum
> process might have marked that block as visible. But the new update
> which has happened, which is linked to the index tuple through the
> head of the update chain might not be visible to everyone. How do you
> think this design takes care of it?
Oh, I see. If it's a HOT update, the index-only-scan would still see the
right thing, because the old and the new row version have the same value
in the indexed columns.
Now if you also delete the heap-only tuple on the new page, that's
different from the page where the root tuple is, that's an interesting
situation. I suppose you'd have to clear the bit in the page holding the
root tuple instead of the page where the tuple itself is.
This is pretty academical, of course, because we don't know how exactly
the cross-page HOT update chains would work.
>>> Heikki,
>>> Is it planned as a optional feature? (I support the optional
>>> feature model)
>> I'm not planning it. Clearly you are :-).
>
> If you are planning it as a non-optional feature, you do realize that
> there might be tables which don't need this index only scan and still
> incur the extra overhead of maintaining the Visibility map.
Oh you were asking if I'm planning the visibility map as an optional
feature. I thought you meant if I'm planning the cross-page HOT update
chains.
I'm thinking the visibility map would always be there, assuming that
updating it is cheap enough. If we have the bit in the heap page header
as well, I believe it would be practically zero-cost.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-11-06 14:58:29 | Re: should I worry? |
Previous Message | ohp | 2007-11-06 14:47:32 | Re: should I worry? |