when a table was last vacuumed
Le 10/02/2010 10:48, AI Rumman a �crit :
If it possible to find out when a table was last vacuumed?
SELECT schemaname, relname, last_vacuum, last_autovacuum
FROM pg_stat_all_tables;
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
But I am using Postgresql 8.1 and here no clumn named last_vacuum.
On Wed, Feb 10, 2010 at 4:12 PM, Guillaume Lelarge
<guillaume@lelarge.info>wrote:
Show quoted text
Le 10/02/2010 10:48, AI Rumman a écrit :
If it possible to find out when a table was last vacuumed?
SELECT schemaname, relname, last_vacuum, last_autovacuum
FROM pg_stat_all_tables;--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
--- On Wed, 10/2/10, AI Rumman <rummandba@gmail.com> wrote:
If it possible to find out when a table
was last vacuumed?
Try:
select pg_stat_get_last_vacuum_time(oid) from "pg_catalog".pg_class where relname = 'tablename';
select pg_stat_get_last_autovacuum_time(oid) from "pg_catalog".pg_class where relname = 'tablename';
Le 10/02/2010 11:23, AI Rumman a �crit :
But I am using Postgresql 8.1 and here no clumn named last_vacuum.
On this old release, the only way you can find such an information is
via the logfile and using DEBUG1 or DEBUG2 level. Not something I would
recommend for a production server.
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com