Re: [HACKERS] Re: [SQL] inserts/updates problem understressing !

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] Re: [SQL] inserts/updates problem understressing !
Дата
Msg-id 379BCCF4.B95C7092@krs.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [SQL] inserts/updates problem under stressing !  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: [HACKERS] Re: [SQL] inserts/updates problem understressing !  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-hackers
Philip Warner wrote:
> 
> The usual way around this sort of problem is to update the counter as the
> first thing you do in any transaction. This locks the row and prevents any
> possible deadlock:

But if there was no record then nothing will be locked...
Without ability to read dirty data LOCK is the only way.

...

> diagnostics' is not yet applied (I may not have mailed it yet...), and I am
> not sure if plpgsql starts a new TX for each statment - if so, you need to
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It doesn't.

> start a TX in the procedure, or prior to valling it.

Vadim


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

Предыдущее
От: "D'Arcy" "J.M." Cain
Дата:
Сообщение: Re: [HACKERS] Problem with dlopen and PostgreSQL - load of file failed
Следующее
От: Michael Robinson
Дата:
Сообщение: Re: [HACKERS] A multi-lang patch for psql 6.5.1