From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Jochem van Dieten <jochemd(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Visibility Groups |
Date: | 2008-08-07 14:18:24 |
Message-ID: | 489B0430.4010809@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Simon Riggs wrote:
> On Thu, 2008-08-07 at 14:18 +0100, Richard Huxton wrote:
>>
>> An attempt to write to user_emails by T0 will fail with an error.
>
> All above correct
>
> The point of doing this is that *if* T0 becomes the oldest transaction
> it will *not* interfere with removal of rows on "user_emails".
>
>> An attempt to read from user_emails by T0 will be allowed?
>
> No, reads must also be excluded otherwise MVCC will be violated.
Ah good - I was wondering, but I read your first email as allowing reads.
>> What happens if I'm in ISOLATION LEVEL SERIALIZABLE? Presumably the read
>> is disallowed then too?
>
> No, that's not relevant. That is your choice about how often you update
> your snapshot of the database. The visibility group refers to the
> *scope* of the snapshot, so the two things are orthogonal.
So - effectively we're partitioning the database into (possibly
overlapping) subsets of tables.
Would it simplify things at all to have a centrally-defined list of
"visibility scopes" (or "groups") which your transaction/user can
access? As a DBA, I'd rather have somewhere central to manage this, and
I'd probably make it per-user anyway.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-08-07 14:20:25 | Re: Visibility Groups |
Previous Message | Simon Riggs | 2008-08-07 14:17:43 | Avoiding Application Re-test |