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

Re: pg_autovacuum and REINDEX at the same time (?)

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Janar Kartau <janar(dot)kartau(at)cvkeskus(dot)ee>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_autovacuum and REINDEX at the same time (?)
Date: 2007-02-28 12:12:18
Message-ID: 45E571A2.2010209@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Janar Kartau wrote:
> I know what causes the "sorry, too many clients already" error, but the 
> number of connections shouldn't grow so big.. so i guess the table 
> (category_tree) got locked.

If that happens again, take a look at pg_stat_activity or ps output to 
see what's going on. Something must be using the connections, a locked 
table alone won't give you that error message.

> We do REINDEX every 5 minutes because the table gets updated very often 
> and the query's took a lot of time. I think since we use autovacuum now, 
> it's not needed anymore.

Yeah, a vacuum is normally enough to keep the indexes in good shape. I'd 
  suggest removing the REINDEX call and either letting autovacuum handle 
it, or adding an explicit VACUUM call after the commit.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-bugs by date

Next:From: Andrew WhiteDate: 2007-02-28 21:59:30
Subject: BUG #3089: View/Table Creation/Ownership Bug
Previous:From: Janar KartauDate: 2007-02-28 11:38:50
Subject: Re: pg_autovacuum and REINDEX at the same time (?)

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