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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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