From: | "Joseph Artsimovich" <joseph_a(at)mail(dot)ru> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | undetected deadlock |
Date: | 2001-12-12 22:51:08 |
Message-ID: | E16EIDU-000Dta-00@f9.mail.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I had a problem in my program (used the wrong mode for locking),
which caused undetected deadlocks. When I tried to reproduce the
problem, I did the following:
1. Create the test table and insert some rows there.
2. Start 2 psql sessions.
3. Execute "begin; lock table test in share mode;" in each session.
4. Execute "update test set data='something'" in each session.
On step 4 (1st session) I've got an undetected deadlock. The
processes' states were "idle waiting" and "idle in transatcion". The
most interesting thing is that I've done the same test before, and
then the deadlock was detected on step 4 (2nd session). Restarting
postgres does not change anything, the deadlock is still not
detected.
I use Postgresql 7.1.3 on RedHat 7.1.
My original problematic program can be downloaded from here:
http://www.dkd.lt/~joseph/test.tar.gz
It's a database session handler written in php. To trigger the
problem, run:
ab -n 100 -c 10 http://yourhost/path_to_the_program/index.php
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Sherry | 2001-12-13 00:30:10 | Re: [GENERAL] ACK table corrupted, unique index violated. |
Previous Message | Doug McNaught | 2001-12-12 22:15:42 | Re: mod_per, postgres, and the file system: limitations |