Re: determine snapshot after obtaining locks for first statement - Mailing list pgsql-hackers

From Tom Lane
Subject Re: determine snapshot after obtaining locks for first statement
Date
Msg-id 4765.1261073585@sss.pgh.pa.us
Whole thread Raw
In response to Re: determine snapshot after obtaining locks for first statement  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: determine snapshot after obtaining locks for first statement  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: determine snapshot after obtaining locks for firststatement  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> What is needed here is a layman's context of what isolation modes are
> good for what type of operation. Neither your explanation or Tom's is
> particularly useful except to say, "Crap, I might be screwed but I don't
> know if I am... how do I find out?"

If we had a simple way to characterize that, we'd not be having this
discussion :-(

One possibility is to try to list the risky cases.  So far I can think
of:

* updates using a WHERE clause that tests columns being changed by other
transactions

* updates using subqueries/joins so that the result depends on other rows
besides the one directly updated/deleted, and those other rows are
subject to concurrent changes

But I'm not sure this is a complete list, and an incomplete one might do
more harm than good ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: determine snapshot after obtaining locks for first statement
Next
From: "Kevin Grittner"
Date:
Subject: Re: determine snapshot after obtaining locks for first statement