Re: BUG #17949: Adding an index introduces serialisation anomalies.
| От | Thomas Munro |
|---|---|
| Тема | Re: BUG #17949: Adding an index introduces serialisation anomalies. |
| Дата | |
| Msg-id | CA+hUKGKuETgQ5a+uS2grX+muz5zEqCD36vM0xDt_C+Utx761nw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: BUG #17949: Adding an index introduces serialisation anomalies. (Thomas Munro <thomas.munro@gmail.com>) |
| Ответы |
Re: BUG #17949: Adding an index introduces serialisation anomalies.
|
| Список | pgsql-bugs |
How is this schedule supposed to work?
S1: _bt_search(&buf)
S1: if (!BufferIsValid(buf)) // because index is empty
S1: {
S1: PredicateLockRelation(...);
S1: ...
S1: return false; // no tuples for you
S2: _bt_search(&buf)
S1: INSERT ...
S2: if (!BufferIsValid(buf)) // because index *was* empty
S2: {
S2: PredicateLockRelation(...);
S2: ...
S2: return false; // no tuples for you
S2: ...
My point is that S2 won't ever scan S1's tuples, so it won't pass S1's
xid to CheckForSerializableConflictOut(). Am I missing something? I
can repro this with NR_THREADS set to only 2, after inserting
pg_usleep(1) after the _bt_search() in _bt_first() (sched_yield()
wasn't quite enough).
В списке pgsql-bugs по дате отправления: