[ please keep the list cc'd, and avoid top-posting ] Valter Nogueira <vgnogueira@xxxxxxxxx> writes: > I get the error in different server with different pg versions. > In this server PG is: > PostgreSQL 9.1.13 on i686-pc-linux-gnu, compiled by gcc (Ubuntu/Linaro > 4.6.3-1ubuntu5) 4.6.3, 32-bit Well, that has the only fix I can think of that might be relevant (commit 1192ba8b6). > Maybe I have autovaccum? I am not sure AFAIK, autovacuum would never take an exclusive lock on an index; nor would any plain DML operation. There must be some command you are issuing that tries to grab exclusive lock on that index, and I'd bet it's something along the line of VACUUM FULL, CLUSTER, or REINDEX applied to pg_class. You might try looking into the postmaster log, which I think will include the text of all SQL commands involved in the deadlock report. If it doesn't, try turning on log_statements so you can see what the other process is running. regards, tom lane