From: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
---|---|
To: | "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> |
Cc: | "Bruce Momjian" <bruce(at)momjian(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, "Pavan Deolasee" <pavan(dot)deolasee(at)enterprisedb(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: CREATE INDEX and HOT - revised design |
Date: | 2007-03-28 18:48:58 |
Message-ID: | 1175107739.4386.432.camel@silverbirch.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2007-03-28 at 23:42 +0530, Pavan Deolasee wrote:
>
>
> On 3/28/07, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
>
> Set it at the end, not the beginning.
>
>
> At the end of what ? It does not help to set it at the end of CREATE
> INDEX because the transaction may not commit immediately. In
> the meantime, many new transactions may start with
> transaction id > xcreate. All these transactions can see the old
> tuple (which we did not index) and can also see the index once
> CREATE INDEX commits.
AtEOX_Reincarnate()... :-)
Set xcreate to InvalidTransactionId when we build the index
If we created an index in this transaction, as soon as we commit the top
level transaction, run another top level transaction to set xcreate
using ReadNewTransactionId().
During WAL replay, we remember any index creations and reset xcreate if
we were unlucky enough to crash between the two transactions.
(I'll be offline now for a few hours until the flames subside.)
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Drake | 2007-03-28 19:00:22 | Re: patch adding new regexp functions |
Previous Message | David Fetter | 2007-03-28 18:48:57 | Re: Arrays of Complex Types |