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

Re: autovacuum on a -mostly- r/o table

From: Tobias Brox <tobias(at)nordicbet(dot)com>
To: Edoardo Ceccarelli <eddy(at)axa(dot)it>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: autovacuum on a -mostly- r/o table
Date: 2006-09-27 16:53:36
Message-ID: 20060927165336.GA11191@oppetid.no (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-performance
[Edoardo Ceccarelli - Wed at 06:49:23PM +0200]
> ...another thing is, how could autovacuum check for machine load, this 
> is something I cannot imagine right now...

One solution I made for our application, is to check the
pg_stats_activity view.  It requires some config to get the stats
available in that view, though.  When the application is to start a
low-priority transaction, it will first do:

  select count(*) from pg_stat_activity where current_query not like
  '<IDL%' and query_start+?<now();

if the returned value is high, the application will sleep a bit and try
again later.


In response to

pgsql-performance by date

Next:From: Matthew T. O'ConnorDate: 2006-09-27 18:33:10
Subject: Re: [PERFORM] autovacuum on a -mostly- r/o table
Previous:From: Edoardo CeccarelliDate: 2006-09-27 16:49:23
Subject: Re: autovacuum on a -mostly- r/o table

pgsql-admin by date

Next:From: Andrea GozziDate: 2006-09-27 16:53:39
Subject: Re: having trouble restoring a database from files
Previous:From: Edoardo CeccarelliDate: 2006-09-27 16:49:23
Subject: Re: autovacuum on a -mostly- r/o table

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