From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Michael Lewis <mlewis(at)entrata(dot)com>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Serializable read only deferrable- implications |
Date: | 2022-03-08 16:04:57 |
Message-ID: | beefe50e38101af2b183fb7e04ddd252169b6e3e.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2022-03-08 at 06:29 -0700, Michael Lewis wrote:
> "The DEFERRABLE transaction property has no effect unless the transaction is also
> SERIALIZABLE and READ ONLY. When all three of these properties are selected for a transaction,
> the transaction may block when first acquiring its snapshot, after which it is able to run
> without the normal overhead of a SERIALIZABLE transaction and without any risk of contributing
> to or being canceled by a serialization failure. This mode is well suited for long-running reports or backups."
>
>
> Could anyone expound on the above? What are the real life differences between the two commands below? Would this be applicable at all to sessions on a physical replica?
>
> SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
>
> SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;
A transaction started with the first statement will not take any SI locks, nor
will it ever receive a serialization error.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Lewis | 2022-03-08 16:16:37 | Re: Serializable read only deferrable- implications |
Previous Message | Adrian Klaver | 2022-03-08 16:03:20 | Re: A simple question: Why 'pg_ctl: command not found...' ? |