pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Ravi Krishna <rkrishna@vivaldi.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Doubt in mvcc
Date: Mon, 13 Jul 2020 05:51:19 -0400
Message-ID: <81860c68-0d85-facd-01a9-8db1a72f933a@vivaldi.net> (raw)
In-Reply-To: <CAJWX+EO_3b+JRCfS7OKtGu4o_n85=9x6AgCrwRcae51dYmYsnw@mail.gmail.com>
References: <CAJWX+EMdFRBP3995Swt6FWgUvO7mvhAwa+2nBXsTmaWeNaB=jQ@mail.gmail.com>
<CAJWX+EP+gabLLBDExnXhi=JNre=xPRo5REAku7FXR6VZFKBBKg@mail.gmail.com>
<CA+bJJbwpPtVX8bEexmmPu=TEmy2MJCcEGuCvbbQmckSS=F2BOA@mail.gmail.com>
<CAJWX+EO_3b+JRCfS7OKtGu4o_n85=9x6AgCrwRcae51dYmYsnw@mail.gmail.com>
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.
view thread (9+ messages) latest in thread
Message-ID: <81860c68-0d85-facd-01a9-8db1a72f933a@vivaldi.net> Permalink: ../81860c68-0d85-facd-01a9-8db1a72f933a@vivaldi.net/ Also on: postgresql.org/message-id/81860c68-0d85-facd-01a9-8db1a72f933a@vivaldi.net ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-general@postgresql.org Cc: rkrishna@vivaldi.net Subject: Re: Doubt in mvcc In-Reply-To: <81860c68-0d85-facd-01a9-8db1a72f933a@vivaldi.net> References: <CAJWX+EMdFRBP3995Swt6FWgUvO7mvhAwa+2nBXsTmaWeNaB=jQ@mail.gmail.com> <CAJWX+EP+gabLLBDExnXhi=JNre=xPRo5REAku7FXR6VZFKBBKg@mail.gmail.com> <CA+bJJbwpPtVX8bEexmmPu=TEmy2MJCcEGuCvbbQmckSS=F2BOA@mail.gmail.com> <CAJWX+EO_3b+JRCfS7OKtGu4o_n85=9x6AgCrwRcae51dYmYsnw@mail.gmail.com> <81860c68-0d85-facd-01a9-8db1a72f933a@vivaldi.net> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox