Re: How can I see if my code is "concurrency safe"?

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: How can I see if my code is "concurrency safe"?
Дата
Msg-id CAKt_Zfs3ND+TyT3sv0ON7KNTw8VXQw7hQ+_ABugKYhroYV8aEg@mail.gmail.com
обсуждение исходный текст
Ответ на How can I see if my code is "concurrency safe"?  (Janne H <jannehson51@yahoo.com>)
Список pgsql-general
On Wed, Apr 25, 2012 at 4:17 PM, Janne H <jannehson51@yahoo.com> wrote:
> Hi there!
>
> Today I realised that my knowledge concerning how postgres handles concurrency is not very good, and its even worse
whenit comes to using that knowledge in real-life. 

I think what everyone here is trying to say is that while PostgreSQL
is very good at handling concurrency itself, you may want to be
careful about making sure your relational constraints are correct.
This means proper use of multi-column keys (either as primary keys,
unique constraints, or foreign keys).  If you do a good job here,
PostgreSQL will handle your concurrency needs for you.

On an internal level, look at how MVCC works. It isn't really a
question of overall concurrency so much as it is a matter of
concurrency performance, since locking is no longer as necessary.
Also check out the serializable transaction level, though the need for
this sort of concurrency protection is rare.

Best Wishes,
Chris Travers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Explain verbose query with CTE
Следующее
От: Bill Moran
Дата:
Сообщение: Re: How can I see if my code is "concurrency safe"?