Re: Set visibility map bit after HOT prune - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Set visibility map bit after HOT prune
Date
Msg-id CA+TgmoaU6UtjaqVb4+kqrUaZ_pcDXVjMtoOEhwb_T93r+qse+A@mail.gmail.com
Whole thread Raw
In response to Re: Set visibility map bit after HOT prune  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Thu, Dec 20, 2012 at 4:58 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> ISTM that if someone spots a block that could use cleanup, they mark
> the block as BM_PIN_COUNT_WAITER, but don't set pid. Then when they
> unpin the block they send a signal/queue work for a special cleaning
> process to come in and do the work now that nobody is waiting. Logic
> would allow VACUUMs to go past that by setting the pid. If we
> prioritised cleanup onto blocks that are already dirty we would
> minimise I/O.

I don't favor that particular signaling mechanism, but I agree that
there is quite a bit of potential utility in having foreground
processes notice that work (like a HOT prune, or setting the VM bit)
needs to be done and pass those requests off to a background process.
I'm hoping the new background worker framework in 9.3 will make that
sort of thing easier for people to play around with.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Set visibility map bit after HOT prune
Next
From: Robert Haas
Date:
Subject: Re: operator dependency of commutator and negator, redux