Re: Doubt in mvcc

Поиск
Список
Период
Сортировка
От Ravi Krishna
Тема Re: Doubt in mvcc
Дата
Msg-id 81860c68-0d85-facd-01a9-8db1a72f933a@vivaldi.net
обсуждение исходный текст
Ответ на Re: Doubt in mvcc  (Rama Krishnan <raghuldrag@gmail.com>)
Список pgsql-general

On 7/13/2020 4:52 AM, Rama Krishnan wrote:

> For example, two transactions are going to increase the amount on the 
> same account by $100 . The first transaction reads the current value 
> ($1000) and then the second transaction reads the same value. The first 
> transaction increases the amount (this gives $1100) and writes this 
> value. The second transaction acts the same way: it gets the same $1100 
> and writes this value. As a result, the customer lost $100.
> 
> 
> Will u please provide more details
> 
> 
> Serialize is the solution to this issue.

MVCC applies to read and write situation.  Readers do not block writers 
and writers do not block read. The example you mentioned above is writer
vs writer and MVCC (both Oracle and PG) is not applicable.



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

Предыдущее
От: "Bojan Petrovic"
Дата:
Сообщение: Interaction between ON CONFLICT index inference and prepared statement generic plans
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Logical replication from 11.x to 12.x and "unique key violations"