Re: [Q] Serializable

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [Q] Serializable
Дата
Msg-id CAKFQuwZ2oR-3RJP0vJ+p0R4xSk7PG1xfTev-CL50rBZ1GJSN4A@mail.gmail.com
обсуждение исходный текст
Ответ на [Q] Serializable  (Ladislav Lenart <lenartlad@volny.cz>)
Ответы Re: [Q] Serializable
Список pgsql-general
On Thu, Sep 24, 2015 at 12:15 PM, Ladislav Lenart <lenartlad@volny.cz> wrote:
Hello.

I would like to know how SERIALIZABLE behaves.

Suppose I have two (or more) concurrent DB transactions:
* Each runs in SERIALIZABLE.
* Each updates (insert / update / delete) different rows in the same table.

Can I get serializable failures (i.e. ERROR: could not serialize access due to
read/write dependencies among transactions)?

This is on 9.4.

Thank you in advance,

​Probably not but there seems to be insufficient information provided to prove this.  You seem to probably have the "write dependency" covered but you mention nothing about "read dependencies".

Why not just assume it can and put code in place to handle that possibility - especially since you should probably be frameworking database access to enforce that all parts of the system use SERIALIZABLE?

David J.
 

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

Предыдущее
От: Ladislav Lenart
Дата:
Сообщение: [Q] Serializable
Следующее
От: Francisco Reyes
Дата:
Сообщение: Dropped connections with pg_basebackup