Vacuuming anything zeroes shared table stats

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Vacuuming anything zeroes shared table stats
Дата
Msg-id 20070607012022.GA79434@winnie.fuhr.org
обсуждение исходный текст
Ответы Re: Vacuuming anything zeroes shared table stats  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Vacuuming anything zeroes shared table stats  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Is vacuuming any table supposed to zero the statistics for all
shared tables?  Doesn't that have implications for autovacuum?  The
example below is in 8.2.4 but I'm seeing similar behavior in 8.1.9
and 8.3devel.  Additionally, in 8.3devel doing anything that queries
or modifies a shared table seems to zero the statistics for all
shared tables.


test=> select relname, seq_scan, idx_scan, n_tup_ins, n_tup_upd, n_tup_del
test-> from pg_stat_all_tables
test-> where relid in (select oid from pg_class where relisshared)
test-> order by relname;    relname      | seq_scan | idx_scan | n_tup_ins | n_tup_upd | n_tup_del 
------------------+----------+----------+-----------+-----------+-----------pg_auth_members  |       25 |        3 |
    1 |         0 |         1pg_authid        |        7 |       40 |         0 |         0 |         0pg_database
|       2 |        7 |         0 |         0 |         0pg_pltemplate    |        2 |        0 |         0 |         0
|        0pg_shdepend      |        0 |        4 |         2 |         0 |         2pg_shdescription |        2 |
0 |         0 |         0 |         0pg_tablespace    |        2 |        0 |         0 |         0 |
0pg_toast_1260   |        1 |        0 |         0 |         0 |         0pg_toast_1262    |        1 |        0 |
  0 |         0 |         0pg_toast_2396    |        1 |        0 |         0 |         0 |         0
 
(10 rows)

test=> vacuum foo;
VACUUM

test=> select relname, seq_scan, idx_scan, n_tup_ins, n_tup_upd, n_tup_del
test-> from pg_stat_all_tables
test-> where relid in (select oid from pg_class where relisshared)
test-> order by relname;    relname      | seq_scan | idx_scan | n_tup_ins | n_tup_upd | n_tup_del 
------------------+----------+----------+-----------+-----------+-----------pg_auth_members  |        0 |        0 |
    0 |         0 |         0pg_authid        |        0 |        0 |         0 |         0 |         0pg_database
|       1 |        0 |         0 |         0 |         0pg_pltemplate    |        0 |        0 |         0 |         0
|        0pg_shdepend      |        0 |        0 |         0 |         0 |         0pg_shdescription |        0 |
0 |         0 |         0 |         0pg_tablespace    |        0 |        0 |         0 |         0 |
0pg_toast_1260   |        0 |        0 |         0 |         0 |         0pg_toast_1262    |        0 |        0 |
  0 |         0 |         0pg_toast_2396    |        0 |        0 |         0 |         0 |         0
 
(10 rows)

-- 
Michael Fuhr


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: [RFC] GSoC Work on readonly queries done so far
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Vacuuming anything zeroes shared table stats