Re: CREATE INDEX and HOT - revised design

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: CREATE INDEX and HOT - revised design
Дата
Msg-id 1175107739.4386.432.camel@silverbirch.site
обсуждение исходный текст
Ответ на Re: CREATE INDEX and HOT - revised design  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Список pgsql-hackers
On Wed, 2007-03-28 at 23:42 +0530, Pavan Deolasee wrote:
> 
> 
> On 3/28/07, Simon Riggs <simon@2ndquadrant.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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Arrays of Complex Types
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: CREATE INDEX and HOT - revised design