Re: Add a new table for Transaction Isolation?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Add a new table for Transaction Isolation?
Дата
Msg-id 553A75E3.4080807@gmx.net
обсуждение исходный текст
Ответ на Re: Add a new table for Transaction Isolation?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Add a new table for Transaction Isolation?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-docs
On 4/17/15 7:36 PM, David G. Johnston wrote:
> diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
> index f88b16e..5002138 100644
> --- a/doc/src/sgml/mvcc.sgml
> +++ b/doc/src/sgml/mvcc.sgml
> @@ -100,6 +100,14 @@
>      phenomena caused by interactions?)
>     </para>
>
> +  <para>
> +   The concepts covered in this section are
> +   presented without examples of the behaviors described.  The internet,
> +   including and espcially the <productname>PostgreSQL</productname> Wiki, is
> +   an excellent resource to learn more about circumstances under which these
> +   data phenomena occur, and what the results look like when they do.
> +  </para>
> +

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.

>     <para>
>      The phenomena which are prohibited at various levels are:
>
> @@ -150,12 +158,12 @@
>      <indexterm>
>       <primary>transaction isolation level</primary>
>      </indexterm>
> -    The four transaction isolation levels and the corresponding
> -    behaviors are described in <xref linkend="mvcc-isolevel-table">.
> +    The four SQL transaction isolation levels, and their corresponding
> +    behaviors, are described in <xref linkend="mvcc-isolevel-table">.
>     </para>

I don't think this change is good.

>
>      <table tocentry="1" id="mvcc-isolevel-table">
> -     <title>Standard <acronym>SQL</acronym> Transaction Isolation Levels</title>
> +     <title><acronym>SQL</acronym> Standard Transaction Isolation Levels</title>
>       <tgroup cols="4">
>        <thead>
>         <row>

Why this change?

> @@ -256,6 +264,89 @@
>     </para>
>
>     <para>
> +    The three <productname>PostgreSQL</productname> transaction isolation levels, and their corresponding
> +    behaviors, are described in <xref linkend="mvcc-pgsql-isolevel-table">.
> +   </para>

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.

> +   <para>
> +    As the table makes clear there is no difference in the potential phenomena
> +    at the REPEATABLE READ and SERIALIZABLE transaction isolation levels; but
> +    the phenomena listed only pertain to the data seen by the transaction.

Please adapt the existing spelling and capitalization.

> +    The difference is that REPEATABLE READ will only serial-fail

This term "serial-fail" would need further explanation.

> +    if two transactions attempt to modify the same record while SERIALIZABLE will
> +    also serial-fail if one transaction modifies a record that another transaction
> +    has only read.
> +   </para>

I don't think this new table adds clarity.  Users should generally have
their applications use the appropriate standard isolation level.  Adding
another table that says, some of these are not actually different,
following by text that says they are different in other ways, just
repeats the point that was made earlier and will be explained in more
detail in the following subsections.

The real difference, in my mind, is that the SQL standard defines four
levels in terms of three criteria, but PostgreSQL really has four
criteria and only three different levels implemented.  It might be worth
visualizing that somehow.

Note that when that section was initially written, the fourth criterion
(serializability) wasn't implemented.




В списке pgsql-docs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Typo in ddl.sgml
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: ALTER TABLE documentation nitpick