Em 18-08-2011 12:54, Greg Smith escreveu:
I was hoping to eventually take the useful summary bits at the end, the
totals, and save those into statistics somewhere each time a VACUUM of
either sort finishes. It would fit with the information shown in
pg_stat_tables, but that's obviously getting too wide. Breaking out a
pg_stat_autovacuum view that contains all the relevant bits currently
shown in that view, plus these 3 new fields, would be a reasonable start.

IMHO the useful summary bits belongs to log. If you want to add it to stats collector go for it. But if you go to the latter road, it is recommended to move some fields (time-related fields) from pg_stat_*_tables to this new view (pg_stat_maintenance?). I don't know how generic you want to go but have in mind I would like to cover automatic and manual maintenance commands.

Besides that another view will cover the maintenance activity. This new view could contain at least datname, schemaname, relname, command_start, command_schedule, operation, progress (?), procpid, and current_command. The name has to be generic to cover all maintenance commands (perhaps pg_maintenance_activity).


--
  Euler Taveira de Oliveira - Timbira       http://www.timbira.com.br/
  PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to