public inbox for [email protected]help / color / mirror / Atom feed
Confused by example in 13.2.2 4+ messages / 3 participants [nested] [flat]
* Confused by example in 13.2.2 @ 2015-08-02 19:02 Dmitry Igrishin <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Dmitry Igrishin @ 2015-08-02 19:02 UTC (permalink / raw) To: pgsql-docs Hello, I'm confused a bit by example in 13.2.2: "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." Could anyone clarify this example? And what is "control record"? Thanks. -- // Dmitry. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confused by example in 13.2.2 @ 2015-08-03 01:35 Kevin Grittner <[email protected]> parent: Dmitry Igrishin <[email protected]> 0 siblings, 2 replies; 4+ messages in thread From: Kevin Grittner @ 2015-08-03 01:35 UTC (permalink / raw) To: Dmitry Igrishin <[email protected]>; pgsql-docs Dmitry Igrishin <[email protected]> wrote: > I'm confused a bit by example in 13.2.2: In current docs that is the "Repeatable Read Isolation Level" section. > "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." > > Could anyone clarify this example? And what is "control record"? Yeah, that sentence doesn't really have enough context. There was discussion around this example in the Wiki: https://wiki.postgresql.org/wiki/SSI#Deposit_Report ... and with that fresh in everyone's memory it seemed to make sense at the time. Would this change make it clear to you?: "For example, you might have a workload involving batches, with a control table having a record to describe the state of each batch and another table with the detail; a read only transaction at this isolation level could 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 the transaction inserting the detail read an earlier version of the control record." Hopefully the example from the Wiki makes it clear. There has been some discussion about whether to link to the Wiki or bring an example like that into the documentation; but we usually don't link to Wiki pages and the example is somewhat long to include in-line in the documentation. Any thoughts on the best solution to that? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confused by example in 13.2.2 @ 2015-08-03 10:45 Dmitry Igrishin <[email protected]> parent: Kevin Grittner <[email protected]> 1 sibling, 0 replies; 4+ messages in thread From: Dmitry Igrishin @ 2015-08-03 10:45 UTC (permalink / raw) To: Kevin Grittner <[email protected]>; +Cc: pgsql-docs 2015-08-03 4:35 GMT+03:00 Kevin Grittner <[email protected]>: > Dmitry Igrishin <[email protected]> wrote: > > > I'm confused a bit by example in 13.2.2: > > In current docs that is the "Repeatable Read Isolation Level" > section. > > > "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." > > > > Could anyone clarify this example? And what is "control record"? > > Yeah, that sentence doesn't really have enough context. There was > discussion around this example in the Wiki: > > https://wiki.postgresql.org/wiki/SSI#Deposit_Report Thank you for the link! > > > ... and with that fresh in everyone's memory it seemed to make > sense at the time. Would this change make it clear to you?: > > "For example, you might have a workload involving batches, with a > control table having a record to describe the state of each batch > and another table with the detail; a read only transaction at this > isolation level could 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 the transaction > inserting the detail read an earlier version of the control > record." > Yes, it's clearer, but the following yet more clear to me: "For example, let you have table Receipt with batches and table Control with a single record pointing to the batch being processed currently. Let the transaction T1 inserts a records into Receipt. At about the same time transaction T2 updates the Control to start working with a new batch and commits. Next, the read only transaction T3 at this isolation level could see an updated by T2 record from Control but not see some records from Receipt which are part of the some batch, because the uncommitted transaction T1 has used earlier version of record from Control upon inserts." > > Hopefully the example from the Wiki makes it clear. There has been > some discussion about whether to link to the Wiki or bring an > example like that into the documentation; but we usually don't > link to Wiki pages and the example is somewhat long to include > in-line in the documentation. Any thoughts on the best solution to > that? > I've tried to adopt the example from Wiki above. Thanks! -- // Dmitry. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confused by example in 13.2.2 @ 2015-08-03 18:37 Alvaro Herrera <[email protected]> parent: Kevin Grittner <[email protected]> 1 sibling, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2015-08-03 18:37 UTC (permalink / raw) To: Kevin Grittner <[email protected]>; +Cc: Dmitry Igrishin <[email protected]>; pgsql-docs Kevin Grittner wrote: > Hopefully the example from the Wiki makes it clear. There has been > some discussion about whether to link to the Wiki or bring an > example like that into the documentation; but we usually don't > link to Wiki pages and the example is somewhat long to include > in-line in the documentation. Any thoughts on the best solution to > that? Yeah, the problem is that the wiki page may evolve and make the "hardcoded" reference nonsensical. I think a rewording similar to what Dmitry proposed downthread is good: it illustrates the concept without need for any external material. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2015-08-03 18:37 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-08-02 19:02 Confused by example in 13.2.2 Dmitry Igrishin <[email protected]> 2015-08-03 01:35 ` Kevin Grittner <[email protected]> 2015-08-03 10:45 ` Dmitry Igrishin <[email protected]> 2015-08-03 18:37 ` Alvaro Herrera <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox