Skip site navigation (1) Skip section navigation (2)

How to Trigger An Automtic Vacuum on Selected Tables

From: "Lane Van Ingen" <lvaningen(at)esncc(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: How to Trigger An Automtic Vacuum on Selected Tables
Date: 2005-09-29 23:05:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
I am running version 8.0.1 on Windows 2003. I have an application that
subjects PostgreSQL to sudden bursts of activity at times which cannot be
predicted. The bursts are significant enough to cause performance
degradation, which can be fixed by a 'vacuum analyze'.

I am aware of the existence and contents of tables like pg_class.

QUESTION: I would like to trigger a vacuum analyze process on a table
whenever it gets a large enough burst of activity to warrant it. Using the
data in pg_class (like the number of pages the system found the last time it
was vacuumed / analyzed), I would like to compare those statistics to
current size, and trigger a vacuum/analyze on a table if needed.

Does anyone know of any available tools, or an approach I could use, to
determine what the CURRENT SIZE is ?


pgsql-performance by date

Next:From: Cosimo StrepponeDate: 2005-09-29 23:19:35
Subject: Re: Monitoring Postgresql performance
Previous:From: Juraj HoltakDate: 2005-09-29 20:56:42
Subject: Re: Monitoring Postgresql performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group