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 wrote: > On Mar 28, 2011, at 9:48 AM, Merlin Moncure wrote: >> On Mon, Mar 28, 2011 at 9:29 AM, Kevin Grittner >> wrote: >>> Tom Lane wrote: >>> The major problem with all of this is that the bgwriter has no idea which buffers contain heap page

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 > wrote: >> Tom Lane 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

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 wrote: > Tom Lane 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 i

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 wrote: > Robert Haas writes: >> On Mon, Mar 28, 2011 at 9:48 AM, Merlin Moncure 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 w

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

2011-03-28 Thread Kevin Grittner
Tom Lane 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 a > world of pa

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

2011-03-28 Thread Tom Lane
Robert Haas writes: > On Mon, Mar 28, 2011 at 9:48 AM, Merlin Moncure 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. That's slightly crufty, but it mi

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 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 currently doesn't d

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 wrote: > On Fri, Mar 25, 2011 at 3:32 PM, Heikki Linnakangas > 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, whi

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 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 prohibitively expensive. > > I don't

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 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 prohibitively expensive. > > I don't

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, actuall

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 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 OLTP env

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 hav

[HACKERS] Set hint bits upon eviction from BufMgr

2011-03-25 Thread Merlin Moncure
Maybe I'm being overly simplistic or incorrect here, but I was thinking that there might be a route to reducing hint bit impact to the main sufferers of the feature without adding too much pain in the general case. I'm unfortunately convinced there is no getting rid of them -- in fact their utilit