Re: select for update not locking properly.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: select for update not locking properly.
Дата
Msg-id 1240.963513335@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: select for update not locking properly.  (Joseph Shraibman <jks@selectacast.net>)
Список pgsql-general
Joseph Shraibman <jks@selectacast.net> writes:
> OK here is the test program.

I don't know Java hardly at all, but it looks like you've got ten
threads in Java all issuing commands through a *single* connection
to a single backend.  Postgres isn't going to lock those threads
against each other for you ... it has no idea whatever that the
sequence of commands it's seeing aren't all from one thread.

You'd need to have ten separate connections to ten separate backends
to get the behavior you're expecting.  Try putting the Connection
objects into the Adder objects and firing them up at Adder creation.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postmaster crashing the server in 7.0.2
Следующее
От: "Peter Mount"
Дата:
Сообщение: Re: Using the JDBC Driver in version 7.02