Skip site navigation (1) Skip section navigation (2)

Re: crash-safe visibility map, take three

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: crash-safe visibility map, take three
Date: 2010-12-02 04:36:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, Dec 1, 2010 at 6:41 PM, Jim Nasby <jim(at)nasby(dot)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 understanding is 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't need 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
The Enterprise PostgreSQL Company

In response to


pgsql-hackers by date

Next:From: ghatpandeDate: 2010-12-02 05:18:31
Subject: Re: Proposal: First step towards Intelligent, integrated database
Previous:From: Tom LaneDate: 2010-12-02 04:34:12
Subject: Re: is cachedFetchXid ever invalidated?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group