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

Re: Page Checksums + Double Writes

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, simon(at)2ndquadrant(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, alvherre(at)commandprompt(dot)com, david(at)fetter(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Page Checksums + Double Writes
Date: 2011-12-28 15:26:16
Message-ID: CAHyXU0xZxJ2GKwMkQicCKBvikZyZRBPgQrAv1j3G1MxWda7Jvw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Dec 28, 2011 at 8:45 AM, Greg Stark <stark(at)mit(dot)edu> wrote:
> On Tue, Dec 27, 2011 at 10:43 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>>  I bet if you kept a judicious number of
>> clog pages in each local process with some smart invalidation you
>> could cover enough cases that scribbling the bits down would become
>> unnecessary.
>
> I don't understand how any cache can completely remove the need for
> hint bits. Without hint bits the xids in the tuples will be "in-doubt"
> forever. No matter how large your cache you'll always come across
> tuples that are arbitrarily old and are from an unbounded size set of
> xids.

well, hint bits aren't needed strictly speaking, they are an
optimization to guard against clog lookups.   but is marking bits on
the tuple the only way to get that effect?

I'm conjecturing that some process local memory could be laid on top
of the clog slru that would be fast enough such that it could take the
place of the tuple bits in the visibility check.  Maybe this could
reduce clog contention as well -- or maybe the idea is unworkable.
That said, it shouldn't be that much work to make a proof of concept
to test the idea.

> We could replace the xids with a frozen xid sooner but that just
> amounts to nearly the same thing as the hint bits only with page
> locking and wal records.

right -- I don't think that helps.

merlin

In response to

pgsql-hackers by date

Next:From: Steve CrawfordDate: 2011-12-28 16:24:37
Subject: Re: pgstat wait timeout
Previous:From: Greg StarkDate: 2011-12-28 14:45:11
Subject: Re: Page Checksums + Double Writes

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