---------------------
The index number is a different one every time.
The log says the same thing.
interesting detail:
On the days that i have successful dumps from, the last dump is finished within 1:15 hours.
But the errors occur at very different times, sometimes 14 hours after the job started (or maybe it started on a different day).
But munin doesn't show clear peak loads on the server.
And this is the script:
---------------------
#!/bin/bash
HOST=localhost
PGPORT=5432
BACKUPDIR=/data/dump/afolder
DATABASE=adatabase
SCHEMAS=`psql -p $PGPORT $DATABASE -t --command "select schema_name from information_schema.schemata where schema_name LIKE 'oz_%'"`
for SCHEMA in $SCHEMAS
do
# mv $BACKUPDIR/$SCHEMA.backup.1 $BACKUPDIR/$SCHEMA.backup.2
mv $BACKUPDIR/$SCHEMA.backup $BACKUPDIR/$SCHEMA.backup.1
pg_dump -Fc -Z3 -p $PGPORT -n $SCHEMA $DATABASE > $BACKUPDIR/$SCHEMA.backup
done
---------------------
It seems like an index gets deleted while pg_dump has it in some task list, and by the time pg_dump wants to dump it, it's gone.
But that should not be possible, because of transactions.
Does anyone know what's up?