Re: [GENERAL] Isolation of schema renames - Mailing list pgsql-general

From Thomas Munro
Subject Re: [GENERAL] Isolation of schema renames
Date
Msg-id CAEepm=2x_bHY4+S9r14_jy-v=aeJuUCKk8g-3FWQowWiem3n_Q@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Isolation of schema renames  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, Aug 10, 2017 at 2:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ben Leslie <benno@benno.id.au> writes:
>> I'm wondering if I can/should expect schema renames to be isolated.
>
> Nope, you should not.
>
> This is not an especially easy thing to fix, because to have the system
> behave as you wish it did, your second transaction would have to be
> ignoring already-committed DDL changes, and it is very easy to show
> examples where that would be fatal.

As mentioned on bug #14691[1], I think it might make theoretical sense
to do SSI checks on system catalogue tables + associated caches
(though I don't claim that's easy).  Then a SERIALIZABLE transaction
would abort if you created a conflict cycle with some other session
that has moved your cheese and it was also running in SERIALIZABLE
isolation.

[1] https://www.postgresql.org/message-id/flat/20170605191104.1442.24999%40wrigleys.postgresql.org

--
Thomas Munro
http://www.enterprisedb.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Isolation of schema renames
Next
From: Ben Leslie
Date:
Subject: Re: [GENERAL] Isolation of schema renames