From: Jan Behrens <jbe-mlist@magnetkern.de>
To: Mohamed Wael Khobalatte <mkhobalatte@grubhub.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Transaction isolation level Repeatable Read Read Only vs Serializable Read Only
Date: Fri, 27 Nov 2020 02:19:11 +0100
Message-ID: <20201127021911.73283b9cf15eed1b4bc9eded@magnetkern.de> (raw)
In-Reply-To: <CABZeWdy44EOjvN5bm-gwg8UM0yv6pfLG6_jY7A_8E3_iXzJAMw@mail.gmail.com>
References: <20201126234509.b856ad06c6c532f843163a57@magnetkern.de>
<CABZeWdy44EOjvN5bm-gwg8UM0yv6pfLG6_jY7A_8E3_iXzJAMw@mail.gmail.com>
On Thu, 26 Nov 2020 19:13:53 -0500
Mohamed Wael Khobalatte <mkhobalatte@grubhub.com> wrote:
> >
> > Thus, what does SERIALIZABLE READ ONLY achieve that REPEATABLE READ READ
> > ONLY does not? And what is SERIALIZABLE READ ONLY DEFERRABLE for?
> >
>
> There is a nice walkthrough of the "control" and "batches/details" scenario
> mentioned in the docs, you can find it in the wiki,
> <https://wiki.postgresql.org/wiki/SSI#Deposit_Report; and I think it
> explains the difference well.
Thank you, it helped me a lot.
If there are two REPEATABLE READ READ WRITE transactions, which do *not* require SERIALIZABLE isolation, there could still be a third READ ONLY transaction, which has stricter requirements on isolation when retrieving data. SERIALIZABLE READ ONLY will fail under certain circumstances in which case the retrieved information should be deemed void and re-requested in a new transaction in order to fit the extra requirements on isolation of the read-only transaction.
Then "DEFERRABLE" makes sense too, as it will make the third transaction block for a certain time instead of risking cancellation.
Thanks
Jan
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: jbe-mlist@magnetkern.de, mkhobalatte@grubhub.com
Subject: Re: Transaction isolation level Repeatable Read Read Only vs Serializable Read Only
In-Reply-To: <20201127021911.73283b9cf15eed1b4bc9eded@magnetkern.de>
References: <20201126234509.b856ad06c6c532f843163a57@magnetkern.de> <CABZeWdy44EOjvN5bm-gwg8UM0yv6pfLG6_jY7A_8E3_iXzJAMw@mail.gmail.com> <20201127021911.73283b9cf15eed1b4bc9eded@magnetkern.de>
* 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