Re: CREATE INDEX and HOT - revised design

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "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>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Subject: Re: CREATE INDEX and HOT - revised design
Date: 2007-03-21 16:56:25
Message-ID: 87slbyfscm.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Bruce Momjian" <bruce(at)momjian(dot)us> writes:

> As stated in later email, I think we should focus on the xid idea
> because it is more flexible.

Sorry if I was unclear. I agree, my comment and questions are all predicated
on the assumption that we would go with xids.

> ---------------------------------------------------------------------------
>
> Gregory Stark wrote:
>>
>> "Bruce Momjian" <bruce(at)momjian(dot)us> writes:
>>
>> > We also add a boolean to pg_class to indicate no new HOT chains should be
>> > created and set that to false once the new index is created.
>>
>> Since we have all the index info in the relcache we could just skim through
>> all the indexes when we build the relcache and decide then whether we're
>> allowed to do HOT updates. That avoids problems if we crash while HOT updates
>> are disabled.
>>
>> I think we need to think harder about exactly what test we would perform
>> against this xid to determine the two relevant tests,
>>
>> a) whether to prohibit HOT updates (because the index is "too new")
>>
>> b) whether to ignore HOT update chains when we use the index (because it's
>> "too new" and any HOT update chains predate it).
>>
>> I fear it may imply that we have to keep performing cold updates until the
>> first vacuum after the xid expires.
>>
>> --
>> Gregory Stark
>> EnterpriseDB http://www.enterprisedb.com
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 1: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>> message can get through to the mailing list cleanly
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://www.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2007-03-21 16:59:56 Re: CREATE INDEX and HOT - revised design
Previous Message Bruce Momjian 2007-03-21 16:40:02 Re: CREATE INDEX and HOT - revised design