Re: Logical to physical page mapping

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Claudio Freire <klaussfreire(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Jan Wieck <JanWieck(at)yahoo(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical to physical page mapping
Date: 2012-10-27 20:57:45
Message-ID: 25570.1351371465@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Claudio Freire <klaussfreire(at)gmail(dot)com> writes:
> On Sat, Oct 27, 2012 at 3:41 PM, Heikki Linnakangas
> <hlinnakangas(at)vmware(dot)com> wrote:
>>> I think you're just moving the atomic-write problem from the data pages
>>> to wherever you keep these pointers.

>> If the pointers are stored as simple 4-byte integers, you probably could
>> assume that they're atomic, and won't be torn.

> That could backfire.

Yeah, the potential loss in resiliency is scary. Assume for the sake of
argument that we're storing these indirection pointers in 8K pages, 2000
or so to the page. If you get a read failure on a regular heap page,
you've lost 8K worth of data. If you get a read failure on an
indirection page, you've lost 16MB worth. (Though perhaps the pointers
could be reconstructed, given additional overhead data on each regular
heap page; but that wouldn't be very cheap.) Also, the write traffic
on a pointer page is 2000X as much as it is on an average heap page,
offering 2000X the opportunities for the disk hardware to drop a bit,
or for SSD storage to wear down, etc. (Perhaps it's not that bad for
typical access patterns, but then again perhaps it's worse, given the
already noted strict requirements for write ordering.) So it seems like
there'd be a rather nasty magnification of consequences for hardware
errors.

You've also got something like a 2000X concentration of access
contention for pointer pages compared to regular pages.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2012-10-27 21:12:59 Re: Logical to physical page mapping
Previous Message Claudio Freire 2012-10-27 20:09:41 Re: Logical to physical page mapping