Hi,
It's ok.
Before the insert, The foreign key constraint locked the row. If
transaction A and B lock the row with FK, before doing UPDATE, they were
stuck.
I found a solution by creating an before insert trigger with a simple
SELECT FROM UPDATE on the row.
Loïc
2013/7/29 Loïc Rollus
Loïc Rollus wrote:
It's ok.
Before the insert, The foreign key constraint locked the row. If transaction
A and B lock the row with
FK, before doing UPDATE, they were stuck.
I found a solution by creating an before insert trigger with a simple
SELECT FROM UPDATE on the row.
You mean SELECT
Hi,
Thanks for your quick reply!
I found the table. But the ctid of the row has changed. But during my test,
I update only 1 row from this table, so I know the row.
I had already put log_statement to 'all'. It's strange because in the log,
I only see simple SELECT ... FROM on this table (no
Here is pg_lock for relation Y (= 2027300)
locktype | database | relation | page | tuple | virtualxid | transactionid
| classid | objid | objsubid | virtualtransaction | pid | mode
| granted
Hello,
I've try to make some concurrency robustness test with an web server app
that use Hibernate and Postgres.
It seems that my trigger make deadlock when multiple thread use it.
I will try to simplify examples:
I have a table films(id, title,director) and a table
directors(id,name,nbreFilms).
Loïc Rollus wrote:
I've try to make some concurrency robustness test with an web server app that
use Hibernate and
Postgres.
It seems that my trigger make deadlock when multiple thread use it.
I will try to simplify examples:
I have a table films(id, title,director) and a table