On Monday, 5 July 2021 at 11:05:19 UTC+10, Derek Ignatius Asirvadem wrote:These issues relate to Transactions, as we have had since 1965 (pre-Relational DBMS) and since 1984 (Relational DBMS), and which concepts and definitions cannot change. That was established entirely by the DBMS vendors, without any help from academia (with the exception of Codd in the post-Relational context).
---------------------------------------------
-- To Progress This Thread --
---------------------------------------------
On Sunday, 4 July 2021 at 20:41:52 UTC+10, Derek Ignatius Asirvadem wrote:
Thus, in addition to
a. clarifying the purpose of your code and progressing it,
b. please continue your digging into /what could go wrong/ in a Transaction Processing context.
__ Two holes, well-known to us of the Transaction Processing fraternity since 1965, remain.
__ And of course [c] the solution.
Now, for this thread, [a] is cancelled. Please place such discussions in the relevant thread.
Please keep [c] in mind, as the goal, and proceed with [b] in order to progress in that direction.
On Monday, 5 July 2021 at 22:00:03 UTC+10, Derek Ignatius Asirvadem wrote:I am back, please forgive the delay. It is madness over here. Worse lockdown conditions in two years. Nothing like a plandemic and a fear-mongering media, slaves of Big Pharma.
On Friday, 23 July 2021 at 22:36:02 UTC+10, Derek Ignatius Asirvadem wrote: Two weeks and no activity. Come on, guys, this thing needs interaction. Proposal. Question. What if.We did, from 1965. There are four categories of error that we know about and have solutoins for, those are two out of four.
We know about Phantoms; Anomalies; Deadlocks.
We can dismiss "Serialisation Anomimimilies" as the particularly stupid way that people who think they have invented the wheel collide with the reality of the road.That is not one of the four categories, it is a unique feature of PissMyselfGross. MySQL and Oracle do not have it. But hey, the academics have written about 100 papers about it, so they think they invented it (in denial of the fact that other MV-non-CC program suites Ingres/Oracle/MySQL had had it for 20 years before they noticed).
What else could go wrong ?Two down, two to go.
What precisely does [D]urable mean ?Durability
https://www.ibm.com/docs/en/cics-ts/5.4?topic=processing-acid-properties-transactions
Exclusions.
What precisely does [D]urable mean ?It means that the outcome of the transaction has been successfully committed. So it has been written to disk (and potentially one or more replica / follower nodes), and won't be lost should the system crash (or the power go out).
Two down, two to go.I know one is lost updates, though I see you've addressed it in your email.
On Sunday, 25 July 2021 at 22:33:22 UTC+10, Derek Ignatius Asirvadem wrote:...
On Saturday, 24 July 2021 at 20:47:50 UTC+10, Daniel Loth wrote:
I read the PDF you put together years ago: http://www.softwaregems.com.au/Documents/The%20Third%20Manifesto/Transaction%20TTM%20101122.pdf
Crikey. A bit of context is demanded.
In hindsight, that was my first crusade, I had made an awful lot of money and I wanted to give something back to my profession; I was responsible enough as a scientist, to correct errors; and I went to the source of those errors and addressed them directly.
<<<<Put another way, I gave the freaks full definition of Lost Update, and the full definition of the solution Optimistic Locking, eleven years ago ... but the drooling idiots still have not got it. Codd and I suffer the same thing from them: the Not Invented Here Syndrome. We are not pure academics, masturbating over our fantasies that have no connection to reality. They ignore and suppress Reality; the genuine SQL platform implementations; Transactions; ACID; anything they did not invent themselves, even if it is fifty years after it has been implemented in Reality.
So did the example Transaction persist, or was it wiped out by a similar Transaction ?So you're talking about notions of physical durability (i.e., my data is written to non-volatile storage and will endure) -- versus -- logic durability (i.e., my data is written and other users of this system who might be operating on the same data will not clobber it without being informed that my transaction has occurred in the period of time between them viewing the data and attempting to act upon it).
- by your definition of [D]urable, the Transaction is fine, the Lost Update is unknown (happens all the time, and people are ignorant that it happens).
- by the IBM definition, the Transaction failed, it did not persist, it is not [D]urable. The Lost Update is known.
But how is it prevented ?In Microsoft SQL Server the most robust way is using the ROWVERSION data type, which is just a very large monotonic integer that is automatically updated when modifying a record in a table with a column of type ROWVERSION. It's essentially timestamp based concurrency control.
Question. What is the *BASIS* for the user having confidence that their Transaction will (should) work ?In a well-designed system? The knowledge that the system won't allow them, or anyone else, to unknowingly overwrite someone else's changes.
How do the na|>ve developers who use an OLTP/SQL platform (especially if they have only MV-non-CC+application locking mindset) prevent Lost Updates ?The naive approach would be to acquire and hold locks for the duration of user activity right? That is, acquire and hold some kind of lock at the time a user opens a screen to view some data, and then release that lock when the user finishes with the screen.
We need to understand it forwards. His Transaction completed and it persists ... and therefore he has confidence in the system. XOR his Transaction completed, but it did not persist ... and therefore he has no confidence in the system. Transaction Sanity/p4.No. Neither the User 1 or User 2 transactions make use of the timestamp based concurrency control.
Was the Transaction Durable or not ?
Correct.If you're using a clock-based timestamp such as DATETIME, instead of a server-wide monotonic integer (which is what the Microsoft ROWVERSION is), what do you do to handle the possibility of clock skew on the database server?
But that is not robust, it is a large overhead. A data-level TimeStamp (DATETIME datatype) is the most robust. We have had that since 1965, 1984 for RDBMS, forty years before MS implemented ROWVERSION.
I am provoking a thought process in your mind. Focus on *BASIS*. Here you have to get rid of any MV-non-CC or rCLMVCCrCY notions because they are bankrupt. Think in terms of Reality, an online shared database that contains a single version of any single fact.So what you're getting at, especially with the mention of paper-based, is: It's inconceivable that you could inadvertently clobber someone else's change to that single piece of paper without being cognisant of that. After all, they've written on the paper and put it back, and then you've picked it up and looked at it. Obviously being a single piece of paper, without duplicates, access to the piece of paper involves queuing up for it and waiting your turn.
On Tuesday, 27 July 2021 at 20:59:24 UTC+10, Daniel wrote:It is my pleasure.
Hi Derek,
Thanks for the response and continued discussion.
---Yes, that is the back end, or developerrCOs understanding.
We need to understand it forwards. His Transaction completed and it persists ... and therefore he has confidence in the system. XOR his Transaction completed, but it did not persist ... and therefore he has no confidence in the system. Transaction Sanity/p4.
Was the Transaction Durable or not ?No. Neither the User 1 or User 2 transactions make use of the timestamp based concurrency control.
---What skew ??? Where is this skew ???
Correct.If you're using a clock-based timestamp such as DATETIME, instead of a server-wide monotonic integer (which is what the Microsoft ROWVERSION is), what do you do to handle the possibility of clock skew on the database server?
But that is not robust, it is a large overhead. A data-level TimeStamp (DATETIME datatype) is the most robust. We have had that since 1965, 1984 for RDBMS, forty years before MS implemented ROWVERSION.
Do you do anything, or do you just take your chances? I recognise that the situation is extraordinarily rare, and you may typically dismiss it on that basis.I canrCOt answer the rCLskewrCY part directly because I donrCOt know what you mean. Re allowing a skew (if there was one), definitely not, I would not do that (we cater for extreme high transaction rates; race conditions; etc in high end Stock Trading environments). The Template has not changed since 1993, it required minor tweaks to cater for the new (additional) Data Storage structure for RFS type files when Sybase ASE 12 came out (IIRC 1999).
---Yes. Excellent parallels drawn. Keep going.
I am provoking a thought process in your mind. Focus on *BASIS*. Here you have to get rid of any MV-non-CC or rCLMVCCrCY notions because they are bankrupt. Think in terms of Reality, an online shared database that contains a single version of any single fact.So what you're getting at, especially with the mention of paper-based, is: It's inconceivable that you could inadvertently clobber someone else's change to that single piece of paper without being cognisant of that. After all, they've written on the paper and put it back, and then you've picked it up and looked at it. Obviously being a single piece of paper, without duplicates, access to the piece of paper involves queuing up for it and waiting your turn.
On Tuesday, 27 July 2021 at 20:59:24 UTC+10, Daniel wrote:
If you're using a clock-based timestamp such as DATETIME, instead of
a server-wide monotonic integer (which is what the Microsoft
ROWVERSION is), what do you do to handle the possibility of clock
skew on the database server?
What skew ??? Where is this skew ???
On Wednesday, 28 July 2021 at 08:03:50 UTC+10, Derek Ignatius Asirvadem wrote:What is in the userrCOs mind, how does he perceive it ?
On Tuesday, 27 July 2021 at 20:59:24 UTC+10, Daniel wrote:
We need to understand it forwards. His Transaction completed and it persists ... and therefore he has confidence in the system. XOR his Transaction completed, but it did not persist ... and therefore he has no confidence in the system. Transaction Sanity/p4.
Yes, that is the back end, or developerrCOs understanding.Was the Transaction Durable or not ?No. Neither the User 1 or User 2 transactions make use of the timestamp based concurrency control.
What is in the userrCOs mind, how does he perceive it ?
What is the *BASIS* for confidence that an update can be performed on a row, or library card ?I am provoking a thought process in your mind. Focus on *BASIS*. Here you have to get rid of any MV-non-CC or rCLMVCCrCY notions because they are bankrupt. Think in terms of Reality, an online shared database that contains a single version of any single fact.
So what you're getting at, especially with the mention of paper-based, is: It's inconceivable that you could inadvertently clobber someone else's change to that single piece of paper without being cognisant of that. After all, they've written on the paper and put it back, and then you've picked it up and looked at it. Obviously being a single piece of paper, without duplicates, access to the piece of paper involves queuing up for it and waiting your turn.Yes. Excellent parallels drawn. Keep going.
- In the paper system, the person (first-up in the queue) would have be cognisant.
- think: a library card system, arranged in 200 little drawers for convenience of physical access by many people
- In the automated system, the program has to be cognisant.
- In the paper system, the person (first-up in the queue for a particular card) has an idea of its data currency based on something, so that when he returns (with the intended update), he would be cognisant that the card has changed.
- In the automated system, the program has to do that.
On Tuesday, 27 July 2021 at 21:37:57 UTC+10, Nicola wrote:Please feel free. Ask a specific question.
Hence, I am eager to hear what you have to say
about it.
Even got SQL Server and Sybase installedWell, I am certainly not going to dissuade you from learning about the real world; about commercial SQL Platforms; what SQL really is; what ACID Transactions mean. Good on you, for taking one more step out of the academic isolation from the all that. On the contrary, I encourage you, as the first academic who is trying to close the chasm, of FORTY YEARS of isolation from the real world.
... to verify your claimsWell, if you enumerate even one or two of those declaration (that you re-frame as "claims"), which are not diminished by your re-framing, I can answer them at short notice, and refer you to manuals, etc. No need to wait six months, no need to download software and gear it up yourself. Please name the declarations that you have trouble accepting.
:)
On Monday, 2 August 2021 at 12:19:13 UTC+10, Derek Ignatius Asirvadem wrote:Yes, of course that is dishonest. In case it needs to be said, I am not saying that you are consciously being dishonest. I am saying, that is standard academic practice, that you are schooled in. The classic method they use: re-frame a declaration as something that it is not, and then either burn it, a Straw Man of your own creation, or at the least diminish it.
On Tuesday, 27 July 2021 at 21:37:57 UTC+10, Nicola wrote:
... to verify your claims
:)
Well, if you enumerate even one or two of those declaration (that you re-frame as "claims")
Concerning clock skewNicola's reply about clock skew covers what I was getting at. Specifically, a clock moving backwards or forwards. Moving backwards means there is potential for you to see the same datetime twice.
Concerning durability and user perceptionIn the user's mind, you are right that their perception of the system is that it has not lived up to the guarantees of the ACID concept of durability. They won't recognise that it was written to disk for a fleeting moment before their changes were clobbered by a subsequent transaction.
Lost currency on page 5 in the Transaction Sanity documentI read this. Basically, the problem is that I load a screen with a number of fields on it. I grab a drink. I come back 10 minutes later, make a minor change, and click 'Save'. In doing so I've just wiped out the work of a colleague who made a lot of changes during my 10 minute absence because what happened to be on my screen was the old, not-current, data when I clicked 'Save'.
The template being unfinishedIs it unfinished due to the lack of lost update protection? Or is there something else missing?
Can we please get some progress here. We have not finished, and the
Template is not complete.
Recap for the exact position that we are at.
On Wednesday, 28 July 2021 at 08:03:50 UTC+10, Derek Ignatius Asirvadem wrote:
On Tuesday, 27 July 2021 at 20:59:24 UTC+10, Daniel wrote:Yes, that is the back end, or developerrCOs understanding.
We need to understand it forwards. His Transaction completed andNo. Neither the User 1 or User 2 transactions make use of the
it persists ... and therefore he has confidence in the system. XOR
his Transaction completed, but it did not persist ... and
therefore he has no confidence in the system. Transaction
Sanity/p4.
Was the Transaction Durable or not ?
timestamp based concurrency control.
What is in the userrCOs mind, how does he perceive it ?
Pages 4 and 5 in the Transaction Sanity doc.
Derek in particular described his approach and in doing so expressed
two principles:
1. Only acquire exclusive (write) locks if the transaction will
potentially succeed.
2. Never acquire exclusive locks if embarking on the transaction is
futile (or put another way, don't start what you absolutely cannot
finish).
Consistent with those principles, the ideal was described as:
1. A validate block - Where we 'look before we leap' (to borrow that >expression). In this block we are reading only. We can use the READ
COMMITTED isolation level, thereby acquiring and releasing shared locks
in quick succession. No shared locks are held after the conclusion of
the statement (i.e., the select query in this case).
2. A transaction block - Where we check again and, if the conditions
are still right (i.e., other users might have changed the data), we can >proceed to do our work and then commit the transaction. In this block
we acquire write locks, and these locks are held for the remainder of
the transaction (until we commit or rollback).
On Tuesday, 3 August 2021 at 08:28:49 UTC+10, Nicola wrote:No. That is not a Transaction. You are still holding onto an incorrect notion that non-transactions are somehow Transactions. That contradicts (a) reality, (b) ACID, (c) SQL ACID compliance. If you keep calling a chichuahua a tiger, you will remain confused. Yes, I know, that is the PissGress mindest, their totally incorrect way of handling their offline versions; their additional 2PL locking, and for that they have redefined "transaction" ... they are always in some hysterically stupid "transaction" mode. It is false.
On 2021-08-02, Derek Ignatius Asirvadem wrote:
Can we please get some progress here. We have not finished, and the Template is not complete.
Recap for the exact position that we are at.
I'd say that there are two Logical Units of Work (LUWrCoI think the termOn Wednesday, 28 July 2021 at 08:03:50 UTC+10, Derek Ignatius Asirvadem wrote:Pages 4 and 5 in the Transaction Sanity doc.
On Tuesday, 27 July 2021 at 20:59:24 UTC+10, Daniel wrote:Yes, that is the back end, or developerrCOs understanding.
We need to understand it forwards. His Transaction completed andNo. Neither the User 1 or User 2 transactions make use of the
it persists ... and therefore he has confidence in the system. XOR
his Transaction completed, but it did not persist ... and
therefore he has no confidence in the system. Transaction
Sanity/p4.
Was the Transaction Durable or not ?
timestamp based concurrency control.
What is in the userrCOs mind, how does he perceive it ?
was used in CICS), one by User 1 and one by User 2. When updating
a value, each user will assume that the value they have replaced is the
one they had previously read (if the system lets the update go through).
Each LUW consists of more than one database transactions. I refer to
each SELECT statement in that example as a (read-only, database) transaction.
Hence, some state must be maintained between databaseYes.
transactions, to make each LUW meet the user's expectations. In this
case, the state is the pair (@CreditRatingCode,@BirthPlace), i.e., the information initially retrieved by each user. Then, both TweedleDumb and TweedleDumber should check that such values have not been changed since
the corresponding previous SELECT, and do so before updating the record.
Rather than checking the values directly, a SELECT could also read
a version number of the retrieved record and pass it to TweedleDumb
(resp., TweedleDumber), which would check that the version number still matches (by re-reading it), in which case it would update the record and increase the version number.
On Tuesday, 3 August 2021 at 17:58:56 UTC+10, Nicola wrote:Thanks, I appreciate credit as much as the next person, but I can't when it is not due. The entire method was established by IBM in the 360 CICS/TPC systems (Codd's employer). In 1979 I merely provided a rendition for our Cincom/TOTAL NDBMS customers. In 1993 I merely provided a rendition in SQL. I will take credit for that.
Derek in particular described his approach and in doing so expressed
two principles:
1. Only acquire exclusive (write) locks if the transaction will >potentially succeed.
2. Never acquire exclusive locks if embarking on the transaction is
futile (or put another way, don't start what you absolutely cannot >finish).
It is not merely an ideal, it is a Formal Method, proved in millions of systems in the real world.Consistent with those principles, the ideal
was described as:In Sybase; MS; DB2, shared locks are held only during the READ operation (pertaining to a page or row), and released. Not the Statement.
1. A validate block - Where we 'look before we leap' (to borrow that >expression). In this block we are reading only. We can use the READ >COMMITTED isolation level, thereby acquiring and releasing shared locks
in quick succession. No shared locks are held after the conclusion of
the statement (i.e., the select query in this case).
We check Data Currency for the Transaction (the first time, not "again").2. A transaction block - Where we check again and, if the conditions
are still right (i.e., other users might have changed the data),
we canYes.
proceed to do our work and then commit the transaction. In this block
we acquire write locks, and these locks are held for the remainder of
the transaction (until we commit or rollback).
Exercise 18.11 (and its solution) from Silberschatz's "Database System Concepts" seems relevant:No.
https://www.db-book.com/db7/Practice-Exercises/PDF-practice-solu-dir/18.pdf
On Tuesday, 3 August 2021 at 08:28:49 UTC+10, Nicola wrote:
I refer to each SELECT statement in that example as a (read-only,
database) transaction.
No. That is not a Transaction. You are still holding onto an
incorrect notion that non-transactions are somehow Transactions.
One correction. LUW was the original CICS term, and it is still used
in IBM/DB2. But it means Transaction, not PoopDePoopGres
"transaction", not whatever you reframe it to mean. LUW means
a single database Transaction, controlled according to ACID.
On Wednesday, 4 August 2021 at 06:05:09 UTC+10, Nicola wrote:
Ok, let me understand: what are the differences in behaviour between
select rCa ;
and
start transaction;
select rCa ;
commit;
Because you have not specified an ISOLATION LEVEL, and because SQL has default ISOLATION LEVELS for each different context, before you
started your example, the ISOLATION LEVEL is 1/READ COMMITTED.
Therefore:
select rCa ;means:
-- ISOLATION LEVEL 1/READ COMMITTEDSQL
-- Locks will be held for the duration of each Read operation (page or row) -- Phantoms and result set Anomalies may occur
Note that that means the SELECT is not in a Transaction.
start transaction;means:
select rCa ;
commit;
START TRANSQL
-- ISOLATION LEVEL 3/SERIALIZABLE
-- Locks will be held until end of Transaction, the COMMIT/ROLLBACK TRAN
-- Phantoms and result set Anomalies will not occur
On Wednesday, 4 August 2021 at 10:15:03 UTC+10, Derek Ignatius Asirvadem wrote:If you wish to evaluate and contemplate the difference, eg. what would happen if the Transactions started at [T1] and [T2] respectively, that is the [Na|>ve Solution] given on page 5.
On Wednesday, 4 August 2021 at 06:05:09 UTC+10, Nicola wrote:
So, wrt to your Transaction Sanity example (latest revision),I will assume page 7, because that is the solution I gave, Optimistic Locking.
User 1 executes one LUW/Transaction, which starts at time T3.
And User 2 executes one LUW/Transaction starting at time T4.
Yes.
Besides, the SELECTs
at T1 and T2, respectively, are not part of those Transactions. Is that right?
Yes.
As per the legend at the bottom of page 4.
Green is resident and executed in the client app.
Blue is resident and executed in the server, the Transaction stored proc. The delay between [T1] and [T3] for User 1, and between [T2] and [T4] for User 2, cannot be controlled due to being user interaction.
On Wednesday, 4 August 2021 at 22:05:01 UTC+10, Derek Ignatius Asirvadem wrote:It is that, and actually, it is worse. You have the academics' Straw Man notion of what a server does; the Straw Man notion of what an Ordinary Lock Manager does (the academics' fantasy "2PL"); the Straw Man notion of the problems that might, just might, happen. In denial of FORTY YEARS of commercial systems that do not have such idiotic problems. I just burn them as you present them.
On Wednesday, 4 August 2021 at 20:13:54 UTC+10, Nicola wrote:
Basically, in your post you are telling me that your mickey mouse system does not do what it should not do. Ok.
And then you are trying to say that the low-level concerns that 10,000 mickey mouse developers have, in their herd of hundreds of programs that have no architecture and handle miserable o/s files, should be of concern to 200 PhD level engineers who eliminated those concerns via a server in 1984, and which has no o/s files. No.
This is just one of the great differences between freeware (including Orable) and commercial SQL Platforms. You get what you pay for.
The problem is, consistently, the insane insist that the sane should have their insane problems. No, they are not real to us. They are real only in the land where people expand vast amounts of energy to make their fantasies real, physicalising their fantasies.
On Wednesday, 4 August 2021 at 20:13:54 UTC+10, Nicola wrote:
On 2021-08-04, Derek Ignatius Asirvadem wrote:
On Wednesday, 4 August 2021 at 06:05:09 UTC+10, Nicola wrote:
Ok, let me understand: what are the differences in behaviour between
select rCa ;
and
start transaction;
select rCa ;
commit;
Because you have not specified an ISOLATION LEVEL, and because SQL has
default ISOLATION LEVELS for each different context, before you
started your example, the ISOLATION LEVEL is 1/READ COMMITTED.
Therefore:
select rCa ;means:
-- ISOLATION LEVEL 1/READ COMMITTEDSQL
-- Locks will be held for the duration of each Read operation (page or row)
-- Phantoms and result set Anomalies may occur
Note that that means the SELECT is not in a Transaction.
Ok. For understading
Because you have not specified an ISOLATION LEVEL, and because SQL has
default ISOLATION LEVELS for each different context, before you
started your example, the ISOLATION LEVEL is 1/READ COMMITTED.
Exercise 18.11 (and its solution) from Silberschatz's "Database System
Concepts" seems relevant:
https://www.db-book.com/db7/Practice-Exercises/PDF-practice-solu-dir/18.pdf
No.
They are stuck in the usual academic mindset, the examples are
particularly about 2PL, which is an MV-non-CC artefact, not relevant
to, or used in SQL OLTP Platforms, because we do not have 2PL. They
do not understand or reference the "1PL" Lock Manager we have in the
real world.
We definitely do not "re-execute" a Transaction, the Validate block is
not a [paraphrased] "first execution without holding locks". The
notion of re-executing a Transaction [note the compute-intensive !] is stupid. The Validate block is a separate formal article.
On Thursday, 5 August 2021 at 00:34:46 UTC+10, Nicola wrote:I have already answered this in detail in this thread. Please read.
On 2021-08-04, Derek Ignatius Asirvadem wrote:I'll try to rephrase my question, which basically asks if you have statement-level consistency of SELECT queries at READ COMMITTED in
On Wednesday, 4 August 2021 at 20:13:54 UTC+10, Nicola wrote:
On 2021-08-04, Derek Ignatius Asirvadem wrote:
On Wednesday, 4 August 2021 at 06:05:09 UTC+10, Nicola wrote:
Ok, let me understand: what are the differences in behaviour between >> >>
select rCa ;
and
start transaction;
select rCa ;
commit;
Because you have not specified an ISOLATION LEVEL, and because SQL has >> > default ISOLATION LEVELS for each different context, before you
started your example, the ISOLATION LEVEL is 1/READ COMMITTED.
Therefore:
select rCa ;means:
-- ISOLATION LEVEL 1/READ COMMITTEDSQL
-- Locks will be held for the duration of each Read operation (page or row)
-- Phantoms and result set Anomalies may occur
Note that that means the SELECT is not in a Transaction.
Ok. For understading
Sybase.
A SELECT statement, which runs at READ COMMITTED, holds (let's say,a. You need to read up on what SQL/Isolation Level/REPEATABLE READ means.
page) locks for the duration of each read operation, and not until the
end of the statement. Assume that the SELECT statement is a complex
query accessing many records over a non-negligible time-span (seconds),
and that it is run concurrently with several (serializable) update operations on the same data.
(1) Is it possible (in Sybase) that the SELECT query returns an
incorrect result, where by "incorrect" I mean a result that is
impossible to obtain when the query is run in a serial context, that is,
in absence of any other concurrent operation?
(2) If the answer to (1) is negative, where does such a correctness guarantee come from? If, on the contrary, the answer to (1) is
affirmative, can you please describe a situation in which that happens?
I'd say that the answer to (1) is affirmative. For instance, duringNice speculation.
a (block) nested-loop join a certain number of pages must be read into memory buffers in the outer loop. Later on, it may be necessary to evict such pages from the memory buffers to make room to another block of
pages. Later on, it may be necessary to read the evicted pages again in
the inner loop (think of join of a table with itself). What prevents concurrent transactions to modify those pages in between the two reads?
On Thursday, 5 August 2021 at 00:46:30 UTC+10, Nicola wrote:???
On 2021-08-04, Derek Ignatius Asirvadem wrote:Btw, why does the transaction isolation level even matter? A single
Because you have not specified an ISOLATION LEVEL, and because SQL has >> > default ISOLATION LEVELS for each different context, before you
started your example, the ISOLATION LEVEL is 1/READ COMMITTED.
SELECT statement (not enclosed in BEGIN TRANrCa COMMIT) is not
a transaction.
A single1. I have laboured to inform you of that. You are on record stating the opposite. Thank God that you have finally got it.
SELECT statement (not enclosed in BEGIN TRANrCa COMMIT) is not
a transaction.
Btw, why does the transaction isolation level even matter?1. It is funny, because in your other questions in this thread, you seem to understand that, you have the answer. But somehow you have lost that knowledge, in order to ask this question. I don't have the qualifications the are required to assist you.
On Thursday, 5 August 2021 at 07:40:10 UTC+10, Nicola wrote:Yes, I know all that. It is pathetically idiotic. They understand Two Phased Commit (server protocol) and they are trying to apply it to Transactions. They are in the same category of ignorant drooling idiots as the freaks in TTM, trying to re-define and re-frame Transactions according to their hysterical fantasies
Exercise 18.11 (and its solution) from Silberschatz's "Database System
Concepts" seems relevant:
https://www.db-book.com/db7/Practice-Exercises/PDF-practice-solu-dir/18.pdf
No.
They are stuck in the usual academic mindset, the examples are particularly about 2PL, which is an MV-non-CC artefact, not relevant
to, or used in SQL OLTP Platforms, because we do not have 2PL. They
do not understand or reference the "1PL" Lock Manager we have in the
real world.
We definitely do not "re-execute" a Transaction, the Validate block isWhat the exercise describes is a concurrency control protocol within the DBMS. So, it's the system that "first execute[s] the transaction without acquiring any locksrCa" and then "rerun[s] the transaction using 2PL". That's transparent for the user.
not a [paraphrased] "first execution without holding locks". The
notion of re-executing a Transaction [note the compute-intensive !] is stupid. The Validate block is a separate formal article.
On Thursday, 5 August 2021 at 11:50:32 UTC+10, Derek Ignatius Asirvadem wrote:With OP's stated goal in mind, when you read the thread, notice how much effort Daniel put into the thread, and that he achieved completion; closure; resolution. Notice how much you put into it, and whether that effort progressed in the direction of the goal.
On Thursday, 5 August 2021 at 00:34:46 UTC+10, Nicola wrote:This thread is about /Stored procedure structure in RDBMS using Lock Manager for transaction isolation/, and the real world of high end implementations. I don't have the inclination to argue speculation against speculation, endlessly.
I'll try to rephrase my question, which basically asks if you have statement-level consistency of SELECT queries at READ COMMITTED inOk. For understadingOk, let me understand: what are the differences in behaviour between
Sybase.
I have already answered this in detail in this thread. Please read.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 00:56:53 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,187 |