FKs and deadlocks - Mailing list pgsql-general

From Philippe Lang
Subject FKs and deadlocks
Date
Msg-id 6C0CF58A187DA5479245E0830AF84F4208044E@poweredge.attiksystem.ch
Whole thread Raw
Responses Re: FKs and deadlocks  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Hello,

As the amount of simultaneous users of my database grows (25 users
sometimes, PGSQL 7.4.5), deadlocks are unfortunately more and more
frequent. I guess this is due to the FKs problem with Postgresql.

I have tried to correct that by adding a "SET CONSTRAINTS ALL DEFERRED"
in every trigger and function, hoping it would solve my problem. Maybe
it helped, but it did not solve anything.

I don't know if anyone has a better idea, but I would like to try taking
away some FKs in my schema. My problem is that I really don't know which
one to delete. There are over 40 tables. Are there rules to do that? Or
maybe can I simply wait on the next deadlock, and try understanding who
got locked by who? OK, but how can I do that?

Thanks for your help!

Philippe

Note: I have read about a patch for FK's, is that something that can
really be used in production?

pgsql-general by date:

Previous
From: nd02tsk@student.hig.se
Date:
Subject: Re: Information about storge engine in PostgreSQL
Next
From: "John Wells"
Date:
Subject: PostgreSQL-related job posting