Re: [PROPOSAL] VACUUM Progress Checker.
От | Amit Langote |
---|---|
Тема | Re: [PROPOSAL] VACUUM Progress Checker. |
Дата | |
Msg-id | CA+HiwqF-UQm9WCLy7TEp13QD+Rwmb3-CGi4QCSvvMN1YXjVRdg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PROPOSAL] VACUUM Progress Checker. (Rahila Syed <rahilasyed90@gmail.com>) |
Ответы |
Re: [PROPOSAL] VACUUM Progress Checker.
|
Список | pgsql-hackers |
Hi, On Thu, Jan 28, 2016 at 7:38 PM, Rahila Syed <rahilasyed90@gmail.com> wrote: >>+ if(!scan_all) >>+ scanned_heap_pages = scanned_heap_pages + >>next_not_all_visible_block; > >>I don't want to be too much of a stickler for details here, but it >>seems to me that this is an outright lie. > > Initially the scanned_heap_pages were meant to report just the scanned pages > and skipped pages were not added to the count. Instead the skipped pages > were deduced from number of total heap pages to be scanned to make the > number of scanned pages eventually add up to total heap pages. As per > comments received later total heap pages were kept constant and skipped > pages count was added to scanned pages to make the count add up to total > heap pages at the end of scan. That said, as suggested, scanned_heap_pages > should be renamed to current_heap_page to report current blkno in > lazy_scan_heap loop which will add up to total heap pages(nblocks) at the > end of scan. And scanned_heap_pages can be reported as a separate number > which wont contain skipped pages. Or keep scanned_heap_pages as is and add a skipped_pages (or skipped_heap_pages). I guess the latter would be updated not only for all visible skipped pages but also pin skipped pages. That is, updating its counter right after vacrelstats->pinskipped_pages++ which there are a couple of instances of. Likewise a good (and only?) time to update the former's counter would be right after vacrelstats->scanned_pages++. Although, I see at least one place where both are incremented so maybe I'm not entirely correct about the last two sentences. Thanks, Amit
В списке pgsql-hackers по дате отправления: