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@example.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"