Re: PG Manual: Clarifying the repeatable read isolation example

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Evan Jones <ej(at)evanjones(dot)ca>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG Manual: Clarifying the repeatable read isolation example
Date: 2014-05-27 19:32:54
Message-ID: 5384E866.6020601@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2014-05-27 19:36:27 Re: pg_llog not mentioned in "Database File Layout"
Previous Message Tom Lane 2014-05-27 19:27:13 Why is pg_lsn marking itself a preferred type?