Re: Set hint bits upon eviction from BufMgr - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Set hint bits upon eviction from BufMgr
Date
Msg-id AANLkTimqnDThotLPCbFmpVfRPaysK4yYZOXCfvT=tSNP@mail.gmail.com
Whole thread Raw
In response to Re: Set hint bits upon eviction from BufMgr  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Set hint bits upon eviction from BufMgr
List pgsql-hackers
On Fri, Mar 25, 2011 at 3:32 PM, Heikki Linnakangas
<heikki.linnakangas@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 prohibitively expensive.
>
> I don't think the naive approach of scanning all tuples would be too bad,
> actually. The hint bits only need to be set once, and it'd be bgwriter
> shouldering the overhead.

I was thinking the same thing.  The only thing I'm worried about is
whether it'd make the bgwriter less responsive; we already have some
issues in that department.

> The problem with setting hing bits when a buffer is evicted is that it
> doesn't help with the bulk load case. The hint bits can't be set for a bulk
> load until the load is finished and the transaction commits.
>
> Maybe it would still be worthwhile to have bgwriter set hint bits, to reduce
> I/O caused by hint bit updates in an OLTP workload, but that's not what
> people usually complain about.

Yeah.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Next
From: Tom Lane
Date:
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name