Re: [GENERAL] select for update not locking properly.

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема Re: [GENERAL] select for update not locking properly.
Дата
Msg-id 396E0DC8.D8CDF135@selectacast.net
обсуждение исходный текст
Список pgsql-interfaces
Damn, I though having seperate Statement objects was supposed to take
care of that.

Peter can you confirm this?

Tom Lane wrote:
>
> 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-interfaces по дате отправления:

Предыдущее
От: Bob Kline
Дата:
Сообщение: Re: DELETING ROW
Следующее
От: Joseph Shraibman
Дата:
Сообщение: How do I use connection pooling?