BUG #1459: Connection hangs when other connection is not committed
От | Rainer Frey |
---|---|
Тема | BUG #1459: Connection hangs when other connection is not committed |
Дата | |
Msg-id | 20050203151126.467DC9A5818@www.postgresql.com обсуждение исходный текст |
Ответы |
Re: BUG #1459: Connection hangs when other connection is not committed
|
Список | pgsql-bugs |
The following bug has been logged online: Bug reference: 1459 Logged by: Rainer Frey Email address: rainer.frey@inxmail.de PostgreSQL version: 8.0.1 Operating system: Redhat Linux 9, Kernel 2.4.20-8, AMD Sempron 2500+, 1GB RAM Description: Connection hangs when other connection is not committed Details: There seems to be a locking problem when not using autocommit. I came across this in a relatively complex Java application, but could reproduce it with the following scenario: (user test has priviledge to create db) createdb -U test -W testdb psql -U test -W testdb CREATE TABLE test_table (id integer); ALTER TABLE test_table ADD test integer; now start another client session, disable autocommit: psql -U test -W testdb \set AUTOCOMMIT off SELECT * FROM test_table; Back in the first session, try to add another column: ALTER TABLE test_table ADD test1 integer; This hangs forever, until I commit session 2. A select should not lock a table even when it is not committed.
В списке pgsql-bugs по дате отправления: