From the course: Advanced PostgreSQL

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

The read committed isolation level

The read committed isolation level - PostgreSQL Tutorial

From the course: Advanced PostgreSQL

The read committed isolation level

In this movie, we'll see how the read committed isolation level works in a PostgreSQL transaction. The read committed isolation level is the default one for transactions. When you use the read committed isolation level, queries in a session can only see the committed updates of transactions executed in other sessions. I'm going to be working with two sessions here. I have two editors open, one for session A and one for session B. You can see this at the top right corner of your screen. I'm now going to begin a new transaction here in session A, that's my first editor, and I'm going to insert a new record. First, I'll execute the begin command to begin the new transaction. Next, I'm going to insert into the bank accounts table the record for Nancy, who has a $15,000 balance. An important detail for you to note here. I've begun the transaction using the begin command, but I haven't committed the changes made within this transaction. Now, within the same session, session A, if I run a…

Contents