Re: PG connections going to 'waiting'

From: Alan McKay <alan(dot)mckay(at)gmail(dot)com>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG connections going to 'waiting'
Date: 2009-09-08 19:46:57
Message-ID: 844129e80909081246i31b2f6e5q90085a3420f64e29@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

OK, looks like the time window is exactly when we run vacuum. That
has been running now for a couple of months no problem, but the last 2
weekends we've been doing massive data loads which could be
complicating things.

Is vacuum a good candidate for what could be locking up the tables?

Here is the script that is running :

---snip---
#Initialize the variables

yesterday=`date -d "yesterday" +%Y-%m-%d`
for db in `psql -t -A -d template1 -c "select datname from
pg_database"`; do /opt/PostgreSQL/8.3/bin/vacuumdb --analyze --full
$db ; done

#Mail wal backup log to admin group
mail -s " Vacuum log on pgprd01 " admin(at)example(dot)com <
/home/postgres/vacuum/vacuum.log

#Move the wal_log_backup.log to the yesterday folder
mkdir /home/postgres/vacuum/$yesterday/
mv /home/postgres/vacuum/vacuum.log
/home/postgres/vacuum/$yesterday/$yesterday_vacuum.log

--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-09-08 20:12:20 Re: PG connections going to 'waiting'
Previous Message Vick Khera 2009-09-08 18:26:16 Re: Snow Leopard bison/flex build problem