Re: crash-safe visibility map, take three

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: crash-safe visibility map, take three
Дата
Msg-id AANLkTimtNC4P+0pGqSHMAx9mVnuJ9UA=ZkTivEwsoULd@mail.gmail.com
обсуждение исходный текст
Ответ на Re: crash-safe visibility map, take three  (Jim Nasby <jim@nasby.net>)
Ответы Re: crash-safe visibility map, take three  (Florian Weimer <fweimer@bfk.de>)
Список pgsql-hackers
On Wed, Dec 1, 2010 at 6:41 PM, Jim Nasby <jim@nasby.net> wrote:
> On Dec 1, 2010, at 2:59 PM, Robert Haas wrote:
>> 2. Hint bits are necessary because an old XID can't be viewed as
>> guaranteed committed.
>
> Hmm... I thought hint bits were necessary because it's too expensive to query CLOG for every tuple. If my
understandingis correct then if we fix the CLOG performance issue we don't need hint bits anymore.
 

My point is - in InnoDB, when an XID aborts, it's not removed from
their equivalent of the ProcArray until it has been fully rolled back.So if you see an XID prior to GlobalXmin, you
don'tneed a hint bit
 
to tell you whether it's committed.  Go directly to yes.

It is also correct to say that it's too expensive to query CLOG for
every tuple.  But InnoDB isn't solving that by having a cheaper CLOG;
they're solving it by not having CLOG at all.  I doubt that it's
possible to make CLOG lookups so cheap that we don't need hint bits
any more.  Take a look at HeapTupleSatisfiesMVCC().  Those hint bit
tests are a single machine instruction.  It's tough to beat that.
It's tough to get within two orders of magnitude.  I'd like to, but I
don't see how.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: is cachedFetchXid ever invalidated?
Следующее
От: ghatpande@vsnl.net
Дата:
Сообщение: Re: Proposal: First step towards Intelligent, integrated database