Re: Set visibility map bit after HOT prune
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Pavan Deolasee <pavan.deolasee@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-12-20T15:55:27Z
Lists: 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