Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris
Дата
Msg-id 20071115114602.GA19014@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> > 2007-11-13 09:21:19.830 PST 9458  LOG:  automatic vacuum of table 
> > "specdb.public.txn_log_table": index scans: 1
> >         pages: 11 removed, 105 remain
> >         tuples: 3147 removed, 40 remain
> >         system usage: CPU 0.11s/0.09u sec elapsed 6.02 sec
> 
> it seems like a serious omission that this gives you no hint how many
> pages were scanned.

Hmm, right.  I'm not sure how to fix it; the simplest idea is to count
the number of heap page accesses in lazy_scan_heap, but this wouldn't
count index pages so it wouldn't be real.  (However, we already report
"index scans" so maybe this is not all that important).

Another, more complex idea would be to use the already existing
infrastructure for counting buffer accesses, as in ShowBufferUsage.
However, just calling ResetBufferUsage and then get the counts would
make the counters useless for the outer reporter (the callers in
postgres.c).  We could have a separate set of "save" counters; so when
vacuum starts, save the current counters and reset them; do the vacuum,
report the counters; and finally, restore the save counters by adding
the current counters.

Is this too complex?

-- 
Alvaro Herrera                 http://www.amazon.com/gp/registry/CTMLCN8V17R4
"La tristeza es un muro entre dos jardines" (Khalil Gibran)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: psql -f doesn't complain about directories
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: psql -f doesn't complain about directories