Ibrahim Harrani <ibrahim.harrani@gmail.com> writes:
> I got a deadlock while vacuuming all databases with vacuumdb command.
> vacuumdb: vacuuming of database "mydb" failed: ERROR: deadlock detected
> DETAIL: Process 1294 waits for AccessExclusiveLock on relation 2662 of
> database ; blocked by process 1807.
> Process 1807 waits for AccessShareLock on relation 1259 of database 16389;
> blocked by process 1294.
vacuumdb -f you mean? An ordinary vacuum wouldn't be trying to take
AccessExclusiveLock.
It might be that you have an instance of a failure that was identified
just a couple weeks ago:
http://archives.postgresql.org/pgsql-committers/2010-01/msg00199.php
regards, tom lane