Re: Turning off HOT/Cleanup sometimes
От | Peter Geoghegan |
---|---|
Тема | Re: Turning off HOT/Cleanup sometimes |
Дата | |
Msg-id | CAM3SWZRGoMwH=pdmsE-1V5x-E-mKz1mE4rBL8N=Yz_N9dk0NDA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Turning off HOT/Cleanup sometimes (Andres Freund <andres@anarazel.de>) |
Список | pgsql-hackers |
On Wed, Apr 15, 2015 at 6:10 AM, Andres Freund <andres@anarazel.de> wrote: >> > Of >> > course, that applies in all cases, but when the page is already dirty, >> > the cost of pruning it is probably quite small - we're going to have >> > to write the page anyway, and pruning it before it gets evicted >> > (perhaps even by our scan) will be cheaper than writing it now and >> > writing it again after it's pruned. When the page is clean, the cost >> > of pruning is significantly higher. >> >> "We" aren't going to have to write the page, but someone will. > > If it's already dirty that doesn't change at all. *Not* pruning in that > moment actually will often *increase* the total amount of writes to the > OS. Because now the pruning will happen on the next write access or > vacuum - when the page already might have been undirtied. > > I don't really see the downside to this suggestion. +1. I think, in general, the opportunity cost of not pruning when a page is already dirty is likely to be rather high. In general, it's likely to be worth it. -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: