Re: Page Checksums + Double Writes - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Page Checksums + Double Writes
Date
Msg-id A88B85F0-5A09-4BA5-91F0-A1729CFF7104@phlo.org
Whole thread Raw
In response to Re: Page Checksums + Double Writes  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Page Checksums + Double Writes
Re: Page Checksums + Double Writes
List pgsql-hackers
On Jan4, 2012, at 21:27 , Robert Haas wrote:
> I think the first thing we need to look at is increasing the number of
> CLOG buffers.

What became of the idea to treat the stable (i.e. earlier than the oldest
active xid) and the unstable (i.e. the rest) parts of the CLOG differently.

On 64-bit machines at least, we could simply mmap() the stable parts of the
CLOG into the backend address space, and access it without any locking at all.

I believe that we could also compress the stable part by 50% if we use one
instead of two bits per txid. AFAIK, we need two bits because we
 a) Distinguish between transaction where were ABORTED and those which never    completed (due to i.e. a backend crash)
and
 b) Mark transaction as SUBCOMMITTED to achieve atomic commits.

Which both are strictly necessary for the stable parts of the clog. Note that
we could still keep the uncompressed CLOG around for debugging purposes - the
additional compressed version would require only 2^32/8 bytes = 512 MB in the
worst case, which people who're serious about performance can very probably
spare.

The fly in the ointment are 32-bit machines, of course - but then, those could
still fall back to the current way of doing things.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: WIP: Join push-down for foreign tables
Next
From: Manabu Ori
Date:
Subject: Re: spinlocks on powerpc