Re: Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal

From: Jim Nasby <Jim(at)Nasby(dot)net>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal
Date: 2010-12-06 17:06:49
Message-ID: 7FC2D2C0-C100-460C-A2E3-9090A449C025@Nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

<html><body class="ApplePlainTextBody" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">On Nov 14, 2010, at 3:40 PM, Greg Stark wrote:<br><blockquote type="cite">On Sun, Nov 14, 2010 at 8:52 PM, Josh Berkus &lt;josh(at)agliodbs(dot)com&gt; wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">For example, imagine if the hint bits were moved to a separate per-table<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">bitmap outside the table instead of being stored with each row, as the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">current FSM is.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">How many times do we have to keep going around the same block?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">We *already* have separate bitmap outside the table for transaction<br></blockquote><blockquote type="cite">commit bits. It's the clog.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The only reason the hint bits exist is to cache that so we don't need<br></blockquote><blockquote type="cite">to do extra I/O to check tuple visibility. If the hint bits are moved<br></blockquote><blockquote type="cite">outside the table then they serve no purpose whatsover. Then you have<br></blockquote><blockquote type="cite">an additional I/O to attempt to save an additional I/O.<br></blockquote><br>Are you sure hint bits are only for IO savings? Calculating visibility from CLOG involves a hell of a lot more CPU than checking a&nbsp;hint bit.<br><br>It would be extremely interesting if the CPU overhead wasn't very noticeable however. That would mean we *only* have to worry about&nbsp;CLOG IO, and there's probably a lot of ways around that (memory mapping CLOG is one possibility), especially considering that 4G&nbsp;isn't exactly a large amount of memory these days.<br>--<br>Jim C. Nasby, Database Architect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jim(at)nasby(dot)net<br>512.569.9461 (cell) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://jim.nasby.net<br><br><br></body></html>

Attachment Content-Type Size
unknown_filename text/html 2.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-06 17:11:09 Re: allow COPY routines to read arbitrary numbers of fields
Previous Message Dmitriy Igrishin 2010-12-06 17:04:57 Re: Suggesting a libpq addition