Re: [GENERAL] Serializable Isolation and read/write conflict withindex and different keys

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: [GENERAL] Serializable Isolation and read/write conflict withindex and different keys
Дата
Msg-id CAEepm=1wUTOyn_eid+2eU0KpbY2bejRmVhBYkRJvgZZY9yea6g@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Serializable Isolation and read/write conflict with index anddifferent keys  (Luca Looz <luca.looz92@gmail.com>)
Ответы Re: [GENERAL] Serializable Isolation and read/write conflict withindex and different keys
Список pgsql-general
On Wed, Aug 30, 2017 at 4:28 AM, Luca Looz <luca.looz92@gmail.com> wrote:
> I'm trying to use the serializable isolation but i'm getting read/write
> dependencies error even if i have an unique index on the column used and the
> transactions are using different keys.
> For an example see this gist:
> https://gist.github.com/nathanl/f98450014f62dcaf0405394a0955e18e
> Is this an expected behavior?

Take a look at the EXPLAIN plan for the SELECT.  You'll get fine
grained SIREAD locks if it's doing a btree index scan, but table-level
SIREAD locks for other kinds of plans.  Sometimes simple SSI tests can
show a lot of false positives just because of empty tables or missing
statistics (ANALYZE).

--
Thomas Munro
http://www.enterprisedb.com


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] Unlogged Crash Detection
Следующее
От: Joe Wildish
Дата:
Сообщение: [GENERAL] CTE in a Recursive Union