From: | iseki zero <admin(at)iseki(dot)space> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Questions about document "Concurrenry control" section |
Date: | 2024-10-09 10:07:09 |
Message-ID: | 7901c7e4-69c6-4bb2-8e9d-ad556d493717@iseki.space |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I found it difficult to understanding some paragraph in the document
"Concurrency control" section.
> The Repeatable Read mode provides a rigorous guarantee that each
transaction sees a completely stable view of the database. However, this
view will not necessarily always be consistent with some serial (one at
a time) execution of concurrent transactions of the same level. 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. Attempts to enforce
business rules by transactions running at this isolation level are not
likely to work correctly without careful use of explicit locks to block
conflicting transactions.
Specifically, I can't understand the example. Why in an earlier
revision, the control record show that the batch has been completed? In
my recognization, the control record state transation should be
"running" -> "completed". And only after all batch operation completed
then the control record will be changed to "completed".
The another big problem is, I interpret the whole batch operation is in
one transaction. So, we can read updates from another uncommited yet
transaction?? I read the front paragraph(Read Committed), the locking
behaviour will effect the read view, and I understand the behaviour
might still be exists in Repeatable Read. But the example said,
read-only transaction.
Thank you
iseki zero
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Semanchuk | 2024-10-09 13:02:38 | Re: Disk is filling up with large files. How can I clean? |
Previous Message | Torsten Förtsch | 2024-10-09 09:52:26 | Re: Disk is filling up with large files. How can I clean? |