Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-04-05 Thread Jim Nasby
On Mar 28, 2011, at 9:48 AM, Merlin Moncure wrote: On Mon, Mar 28, 2011 at 9:29 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Tom Lane t...@sss.pgh.pa.us wrote: The major problem with all of this is that the bgwriter has no idea which buffers contain heap pages. And I'm not

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-04-05 Thread Merlin Moncure
On Tue, Apr 5, 2011 at 9:49 AM, Jim Nasby j...@nasby.net wrote: On Mar 28, 2011, at 9:48 AM, Merlin Moncure wrote: On Mon, Mar 28, 2011 at 9:29 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Tom Lane t...@sss.pgh.pa.us wrote: The major problem with all of this is that the bgwriter has

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-28 Thread Merlin Moncure
On Fri, Mar 25, 2011 at 3:18 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 25, 2011 at 3:32 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 25.03.2011 16:52, Merlin Moncure wrote: Without this bit, the only way to set hint bits going during bufmgr eviction is

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-28 Thread Robert Haas
On Mon, Mar 28, 2011 at 9:48 AM, Merlin Moncure mmonc...@gmail.com wrote: I'd like to experiment on this and see what comes out. Great! If the bgwriter was to be granted the ability to inspect buffers and set hints, it needs to be able to peek in and inspect the buffer itself which it

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Mar 28, 2011 at 9:48 AM, Merlin Moncure mmonc...@gmail.com wrote: I was thinking about setting a flag in the buffer (BM_HEAP) that gets set by the loader which flags the buffer for later inspection.  Is there a simpler way to do this? Hmm.

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-28 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: The major problem with all of this is that the bgwriter has no idea which buffers contain heap pages. And I'm not convinced it's a good idea to try to let it know that. If we get to the point where bgwriter is trying to do catalog accesses, we are in for

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-28 Thread Robert Haas
On Mon, Mar 28, 2011 at 10:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Mar 28, 2011 at 9:48 AM, Merlin Moncure mmonc...@gmail.com wrote: I was thinking about setting a flag in the buffer (BM_HEAP) that gets set by the loader which flags the

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-28 Thread Merlin Moncure
On Mon, Mar 28, 2011 at 9:29 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Tom Lane t...@sss.pgh.pa.us wrote: The major problem with all of this is that the bgwriter has no idea which buffers contain heap pages.  And I'm not convinced it's a good idea to try to let it know that.  If

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-25 Thread Jim Nasby
On Mar 25, 2011, at 9:52 AM, Merlin Moncure wrote: Without this bit, the only way to set hint bits going during bufmgr eviction is to do a visibility check on every tuple, which would probably be prohibitively expensive. Since OLTP environments would rarely see this bit, they would not have

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-25 Thread Merlin Moncure
On Fri, Mar 25, 2011 at 10:34 AM, Jim Nasby j...@nasby.net wrote: On Mar 25, 2011, at 9:52 AM, Merlin Moncure wrote: Without this bit, the only way to set hint bits going during bufmgr eviction is to do a visibility check on every tuple, which would probably be prohibitively expensive.  Since

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-25 Thread Heikki Linnakangas
On 25.03.2011 16:52, Merlin Moncure wrote: Without this bit, the only way to set hint bits going during bufmgr eviction is to do a visibility check on every tuple, which would probably be prohibitively expensive. I don't think the naive approach of scanning all tuples would be too bad,

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-25 Thread Merlin Moncure
On Fri, Mar 25, 2011 at 2:32 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 25.03.2011 16:52, Merlin Moncure wrote: Without this bit, the only way to set hint bits going during bufmgr eviction is to do a visibility check on every tuple, which would probably be

Re: [HACKERS] Set hint bits upon eviction from BufMgr

2011-03-25 Thread Robert Haas
On Fri, Mar 25, 2011 at 3:32 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 25.03.2011 16:52, Merlin Moncure wrote: Without this bit, the only way to set hint bits going during bufmgr eviction is to do a visibility check on every tuple, which would probably be