Re: Set visibility map bit after HOT prune

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Set visibility map bit after HOT prune
Date: 2012-12-20 15:55:27
Message-ID: CA+TgmoaU6UtjaqVb4+kqrUaZ_pcDXVjMtoOEhwb_T93r+qse+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 20, 2012 at 4:58 AM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2012-12-20 15:58:12 Re: Parser Cruft in gram.y
Previous Message Robert Haas 2012-12-20 15:53:32 Re: Set visibility map bit after HOT prune