Spurious failure to obtain row lock possible in PG 9.1?

Поиск
Список
Период
Сортировка
От henk de wit
Тема Spurious failure to obtain row lock possible in PG 9.1?
Дата
Msg-id COL104-W539FF61567ED37014F53A8F59E0@phx.gbl
обсуждение исходный текст
Ответы Re: Spurious failure to obtain row lock possible in PG 9.1?  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-performance
I'm using Postgres 9.1 on Debian Lenny and via a Java server (JBoss AS 6.1) I'm executing a simple "select ... for update" query:

SELECT

importing

FROM

customer

WHERE

id = :customer_id

FOR UPDATE NOWAIT


Once every 10 to 20 times Postgres fails to obtain the lock for no apparent reason:

18:22:18,285 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 55P03
18:22:18,285 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: could not obtain lock on row in relation "customer"

I'm "pretty" sure there's really no other process that has the lock, as I'm the only one on a test DB. If I execute the query immediately again, it does succeed in obtaining the lock. I can however not reproduce this via e.g. PGAdmin.

Is it possible or perhaps even known that PG has this behavior, or should I look for the cause in the Java code? (I'm using Java EE"s entity manager to execute a native query inside an EJB bean that lets a JDBC connection from a pool join a JTA transaction.)

Thanks!

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Postgres becoming slow, only full vacuum fixes it
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Spurious failure to obtain row lock possible in PG 9.1?