Re: PG Manual: Clarifying the repeatable read isolation example

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: PG Manual: Clarifying the repeatable read isolation example
Дата
Msg-id 5384E866.6020601@vmware.com
обсуждение исходный текст
Ответ на PG Manual: Clarifying the repeatable read isolation example  (Evan Jones <ej@evanjones.ca>)
Ответы Re: PG Manual: Clarifying the repeatable read isolation example
Re: PG Manual: Clarifying the repeatable read isolation example
Список pgsql-hackers
On 05/27/2014 10:12 PM, Evan Jones wrote:
> I was reading the Postgres MVCC documentation today (which is
> generally fantastic BTW), and am slightly confused by a single
> sentence example, describing possible read-only snapshot isolation
> anomalies. I would like to submit a patch to clarify this example,
> since I suspect others may be also confused, but to do that I need
> help understanding it. The example was added as part of the
> Serializable Snapshot Isolation patch.
>
> Link to the commit:
> http://git.postgresql.org/gitweb/?p=postgresql.git;h=dafaa3efb75ce1aae2e6dbefaf6f3a889dea0d21
>
>
>
> I'm referring to the following sentence of 13.2.2, which is still in
> the source tree:
>
> http://www.postgresql.org/docs/devel/static/transaction-iso.html#XACT-REPEATABLE-READ
>
>  "For example, even a read only transaction at this level may see a
> control record updated to show that a batch has been completed but
> not see one of the detail records which is logically part of the
> batch because it read an earlier revision of the control record."

Hmm, that seems to be a super-summarized description of what Kevin & Dan 
called the "receipts problem". There's an example of that in the 
isolation test suite, see src/test/isolation/specs/receipt-report.spec. 
Googling for it, I also found an academic paper written by Kevin & Dan 
that illustrates it: http://arxiv.org/pdf/1208.4179.pdf, "2.1.2 Example 
2: Batch Processing". (Nice work, I didn't know of that paper until now!)

I agree that's too terse. I think it would be good to actually spell out 
a complete example of the Receipt problem in the manual. That chapter in 
the manual contains examples of anomalities in Read Committed mode, so 
it would be good to give a concrete example of an anomaly in Repeatable 
Read mode too. Want to write up a docs patch?

- Heikki



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Why is pg_lsn marking itself a preferred type?
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: pg_llog not mentioned in "Database File Layout"