Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YlkP6-0002u7-K0 for pgsql-docs@arkaria.postgresql.org; Fri, 24 Apr 2015 20:40:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YlkP5-00005I-Va for pgsql-docs@arkaria.postgresql.org; Fri, 24 Apr 2015 20:40:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YlkP4-00005B-Gn for pgsql-docs@postgresql.org; Fri, 24 Apr 2015 20:40:51 +0000 Received: from nm7-vm0.bullet.mail.ne1.yahoo.com ([98.138.91.66]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YlkOy-00056A-QO for pgsql-docs@postgresql.org; Fri, 24 Apr 2015 20:40:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1429908041; bh=4cXNIXHYnruj6M44LplSF+fWArkjeV22lsvH7UT5bO0=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=c1vdcPJhwLhslPjUfn99NSSelLVMLfKJ1osz/BR1jEgJd6ewzwSSeUOBjbWrRbB6OPHdO2q4qE/GIRWBuC+9HNUyupMp73N7uFRtxLs3rdWGZp37u2SaIHWhQ28sWTXVjOAhlKT67t7d93PCW8U5v3VTNfTdeEOkv4M+RE0/PetNryuoTFZOHY55g439SdpwncWLX2ykTOQ+OIxM3A5LFHzWcirTNKRd0aP0T5OpLqdvdUWG2QUINymhxqxCGi4ThuqrtRH4SLDLaeI9IBDomF5nYFdbh0JWh50lzHSZ+BgAtUoR8MUp5Wo27UKidlilZqag0Esor85wgz25CL1sqA== Received: from [98.138.226.179] by nm7.bullet.mail.ne1.yahoo.com with NNFMP; 24 Apr 2015 20:40:41 -0000 Received: from [98.138.88.239] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 24 Apr 2015 20:40:41 -0000 Received: from [127.0.0.1] by omp1039.mail.ne1.yahoo.com with NNFMP; 24 Apr 2015 20:40:41 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 594075.95534.bm@omp1039.mail.ne1.yahoo.com X-YMail-OSG: 1XjGTDgVM1kVFnKXk08sydKY7JACDBLmTG6nivGDONR4jaVKMld6FiaVSXEiOb2 HtT78bIENvNZC6c6iwIoRMTeFKJx7xbjc436l6418BSs1B5yhppQbz1aTCEpYn_36l_HZYrnAfyJ paXozQWPhfAs41uJfGdk6TzjiGiQcCFOuribTjSEVZoq.Tvh0H5XnScpb4FA0IV.aYr5r37S4A4o mCVxxU_iBEzcqFU2.fDSdgPQ1UHob7qOlEnWavWoL4FwZMGx5emiwqP2pSNd1xAg1jGsTaMe2gGC 07inOxnpVUNTT5Tab.mdN82INAUD25Taa5447BmF1QKKqfG3nHvVD.t0ZMn1xZRxo7JZJ.h75PP0 1UyW5vqoz_hXEsKatWDecdtU.hikFm83kyENTLX6gOu9_Y2KxvjNR93RlXfeD96khZTguOs.o9dc WiHtlAxTUqSiy7htmasQ.QFQR2YDWEvUEhpbUXC4jFIHt8ZE4Ko2M8o7g3mJ3IshI5fmf1WPDBQS o11GjMcgKw8U5Jh4Mn5Oh Received: by 98.138.105.194; Fri, 24 Apr 2015 20:40:41 +0000 Date: Fri, 24 Apr 2015 20:40:40 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: "David G. Johnston" , Peter Eisentraut Cc: Bruce Momjian , "pgsql-docs@postgresql.org" Message-ID: <1691752982.3879494.1429908040587.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: Add a new table for Transaction Isolation? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Length: 8970 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org David G. Johnston wrote: > On Fri, Apr 24, 2015 at 9:57 AM, Peter Eisentraut wrote: >> On 4/17/15 7:36 PM, David G. Johnston wrote: >>> + >>> + The concepts covered in this section are >>> + presented without examples of the behaviors described. The interne= t, >>> + including and espcially the PostgreSQL W= iki, is >>> + an excellent resource to learn more about circumstances under which= these >>> + data phenomena occur, and what the results look like when they do. >>> + >> >> I don't think our documentation should go out of its way to say, "our >> documentation is bad, look elsewhere". If we think examples are >> necessary, then we should add some. Otherwise, it's implied that >> improvement is always possible. > > =E2=80=8BI'm not - I am explicitly listing the assumptions the > documentation makes regarding reader experience (and ease of > documenting) - and pointing out were the reader can go if their > experience is lacking in those areas.=E2=80=8B It seems unproductive to > move all of the SSI content on our Wiki into the documentation and > so, lacking such, we should point out where else content can be > found. There have been suggestions before that some or all of the Wiki's SSI page be brought into the docs, or that the docs reference it. Bringing all of it in does seem like quite a lot for a single feature like this. I'm not sure what the best course is. >>> >>> - Standard <acronym>SQL</acronym> Transaction Isolation Leve= ls >>> + <acronym>SQL</acronym> Standard Transaction Isolation Leve= ls >>> >>> >>> >> >> Why this change? > > =E2=80=8BThe new table reads "PostgreSQL ..." and the corresponding noun = is > the "SQL Standard". Writing "Standard SQL" can be read as implying > the existence of "Non-Standard SQL..." which is not correct. Just > saying "SQL..." seems to be too generic - though after reading the > conclusion and pondering that "SQL Standard" could also imply "SQL > Non-Standard..." I'm not so sure whether just saying SQL wouldn't > be best. "Here are the four words that can be used with SET > TRANSACTION ISOLATION LEVEL..." - and then show/describe the > minimum required non-behaviors and the non-behaviors as implemented > in PostgreSQL. > > =E2=80=8BMaybe possessive would work "PostgreSQL's ..." and "SQL Standard= 's..."=E2=80=8B Personally I think that "standard SQL" means "SQL, as defined by international standards documents." I see no benefit to changes along the lines suggested here. >>> >>> + The three PostgreSQL transaction isolat= ion levels, and their corresponding >>> + behaviors, are described in . >>> + >> >> This isn't really correct. The PostgreSQL isolation levels were >> described in the paragraph above. The table is really just a summary of >> the previous explanation. > > =E2=80=8B"[...], are summarized in " ? The problem with tables like this is that sometimes people just look at the table and assume that it is the *definition* of the isolation levels. At *no* point did *any* version of the SQL standard *ever* define the serializable transaction isolation level in terms of the phenomena shown in the table. The definition has always been: | The execution of concurrent SQL-transactions at isolation level | SERIALIZABLE is guaranteed to be serializable. A serializable | execution is defined to be an execution of the operations of | concurrently executing SQL-transactions that produces the same | effect as some serial execution of those same SQL-transactions. A | serial execution is one in which each SQL-transaction executes to | completion before the next SQL-transaction begins. Serializable transactions have been included in the table of which phenomena are allowed to occur at which isolation levels; but the table has always been followed by this note: | The exclusion of these phenomena for SQL-transactions executing | at isolation level SERIALIZABLE is a consequence of the | requirement that such transactions be serializable. Yet so many people have not looked beyond the table to see the actual definition of "serializable" in the standard that the absence of these three phenomena has often been mistakenly considered adequate for compliance with the standard. A 1995 paper titled "A Critique of ANSI SQL Isolation Levels" by Berenson, et al, notes this, saying: | Subclause 4.28, =E2=80=9CSQL-transactions=E2=80=9D, in [ANSI] notes that = the | SERIALIZABLE isolation level must provide what is =E2=80=9Ccommonly known | as fully serializable execution.=E2=80=9D The prominence of the table | compared to this extra proviso leads to a common misconception | that disallowing the three phenomena implies serializability. ... and later observes: | It would have been simpler [...] to drop [references to phantom | reads] and just use Subclause 4.28 to define ANSI SERIALIZABLE. I tend to agree. Not only would it have been simpler, I think it would have prevented a lot of misunderstanding of the requirements of the standard. Tables like this can do a lot more to promote confusion and misunderstanding than clarity. If we're going to make a change here, I think rather than doubling down on the standard's questionable inclusion of such a table by providing *two* tables, we should consider removing the existing table. > =E2=80=8B=E2=80=8BThen why not sure write the entire section relative to = the > standard and point out the differences between the standard and our > implementation on the command definition page in the compatibility > section? Many people don't have access to the standard, the standard is confusing to many, and the standard is specifically written to specify minimum required behaviors rather than anything that is dependent on implementation. The standard does not say that the READ UNCOMMITTED transaction isolation level allows other transactions to see the uncommitted work of a transaction; it merely says that no other transaction isolation level may do so. The same is true with all the phenomena -- our implementation does not "differ" from the standard on those points; it is in full compliance with it. > =E2=80=8BOtherwise, a summary table describing our implementation seems > like a self-evident need. We are already going to great lengths to > describe everything in the table anyway and we already are using a > table to describe the standard's definitions.=E2=80=8B Placing said table > here seems easiest and if summarizing what is already present in > the text somehow makes the section more confusing I posit that it > must already be confusing without the table. At least this way the > confusing stuff is summarized and is readily available for lookup > by those who know what they are looking for. But the table, by its nature, does not provide the full set of information, and too many people just look at the table because "it's easy". The question seems to me to be whether providing an easy way to get an inaccurate understanding of the topic has value; I submit that the confusion caused by the table in the standard (in spite of a note immediately after the table to try to prevent that) shows that it is not. > Two separate patches here: > > 1) =E2=80=8Bpointing out that additional information is available on the > wiki and the internet That and/or bringing in one or more of the Wiki example. > 2) summarizing the PostgreSQL implementation into a table similar > to that already present for the Standard > > #2 can be implemented in the MVCC section or a more extensive patch > can also update the SQL command SET TRANSACTION section - which > will mean someone feels strongly enough that the status quo is > better than updating MVCC while waiting for someone to write the > more invasive patch. And, for reasons given above, I really question whether such a table doesn't do more harm than good. Even those citing the paper by Berenson, et al., often miss the text in *that* paper about what the actual definition of serializable transactions in the standard is, and instead focus on the quick-to-read tables of how the misinterpretation of serializable transactions based on the standard's table of phenomena (which the paper dubs "ANOMALY SERIALIZABLE") differs from truly serializable behavior. People do love tables like this, which makes providing them tempting; but when a short, clean table is available they often seem less inclined to take the trouble to read the real information the table summarizes -- and they come away with distorted and incorrect ideas about the subject matter. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs