Transactions, Concurrency Control, and Isolation Levels Questions
How a database engine manages concurrent access from multiple transactions: ACID guarantees (atomicity, consistency, isolation, durability), the standard isolation levels (read uncommitted, read committed, repeatable read, serializable) and the anomalies they permit or prevent (dirty reads, non-repeatable reads, phantom reads, lost updates, write skew), pessimistic locking versus optimistic concurrency control, deadlock detection and handling (including a single transaction that holds locks across more than one shard), and choosing an isolation level for a given workload (for example OLTP writes versus reporting reads). Also covers MVCC as the mechanism that delivers these guarantees, including snapshot isolation versus true serializability and the version cleanup (vacuum) MVCC requires to control table and index bloat from old row versions. Does not cover correctness across separate databases or services, such as two-phase commit, distributed consensus, or replication and sharding topology design.
You need to change a high-throughput OLTP database's isolation level from read committed to repeatable read, but the team is worried about the production impact. Design an experiment to validate the change safely: how would you generate a representative workload, what would you measure (throughput, latency, serialization failures, lock waits), what trade-offs do you expect, and what is your rollback plan if something goes wrong in production?
Sample Answer
Direct answer
Treat this as a staged rollout with a reversible switch, not a one-way migration: baseline the current READ COMMITTED (RC) workload, replay a representative workload under REPEATABLE READ (RR) offline, then canary a small slice of real traffic, watching throughput, latency, serialization failures, and lock waits at every stage. Because the isolation level is a session-level setting in PostgreSQL rather than a schema change, the rollback plan is cheap: flip the default back and reconnect, no data migration involved. The main risk is not "RR is slow": it is that any multi-statement transaction that reads a row and later writes based on that read can now abort with a serialization error it never saw before, and the application has to be ready to retry it.
How to generate a representative workload
- Capture the real transaction mix first. Query
pg_stat_statements(Postgres's built-in extension that tracks normalized query text, call counts, and timing) in production to get the actual ratio of read-only queries, single-statement writes, and multi-statement read-then-write transactions. A synthetic workload that ignores this ratio will under- or over-state the impact, because RC and RR behave identically for a single autocommit statement: RR only changes behavior once a transaction issues more than one statement against data another transaction is concurrently modifying. - Seed realistic data volume and skew. Use
generate_seriesto populate staging tables to a size close to production (row count and index depth affect lock granularity and how often two transactions touch the same row). Skewed access (a handful of "hot" rows getting most of the writes) is what actually triggers serialization failures under RR, so a uniform random workload will understate the risk; deliberately weight a fraction of transactions toward a small hot-row set. - Drive it with
pgbench. Write a custompgbenchscript (not the default TPC-B-style script) that replays the captured statement mix, and run it at several concurrency levels (for example, the current production connection-pool size, and 2x that) against a staging replica sized like production.
What to measure
| Signal | Where to get it | Why it matters |
|---|---|---|
| Throughput | pgbench TPS (transactions committed per second) | The headline "did it get slower" number |
| Latency | p50 / p95 / p99 (the median, 95th-percentile, and 99th-percentile latency: p99 means 99% of requests were at least this fast) per-statement and per-transaction latency | RR holds a snapshot open longer; tail latency moves before the average does |
| Serialization failures | Count of SQLSTATE 40001 errors (Postgres's "could not serialize access" error code), from app logs or pg_stat_database.xact_rollback deltas | This is the RC-to-RR-specific anomaly: it barely exists under RC and appears under RR |
| Lock waits | pg_locks joined to pg_stat_activity, and log_lock_waits turned on during the test | Distinguishes "transactions are aborting" (serialization failure) from "transactions are queuing" (lock contention), which need different fixes |
Run each configuration for a sustained window (long enough to pass through several checkpoint, the periodic flush of in-memory changes to disk, and autovacuum cycles, not just a short burst) and repeat it several times so you can compare distributions, not single samples.
Expected trade-offs
RR in PostgreSQL is implemented as snapshot isolation: a transaction reads a consistent snapshot of the database taken at its first statement, instead of a fresh committed-as-of-now view on every statement. That buys correctness (no non-repeatable reads) at a cost that shows up in exactly two places: (1) any transaction that reads a row and later blindly updates it based on that read can now hit a 40001 serialization failure if someone else committed a conflicting change to that row in between, forcing an application-level retry; and (2) PostgreSQL has to keep old row versions alive for as long as the oldest open RR snapshot exists, which can delay VACUUM (Postgres's background process that reclaims space from old row versions once nothing needs them anymore) and increase table bloat (wasted disk space from old versions piling up faster than VACUUM can clear them) if some RR transactions run long. Read-only reporting queries and single-statement writes should show close to zero change, because there is nothing for RR to "hold" across a single statement.
Worked example: sizing the experiment
Before running the experiment, size it so a "no measurable difference" result is trustworthy rather than just underpowered. Suppose the team wants to be confident of detecting a serialization-failure rate of 1% per transaction under RR (RC cannot produce a 40001 in PostgreSQL at all, since serialization checks are a snapshot-isolation feature RC does not use, so the RC baseline is 0%). This is a standard two-proportion sample-size calculation, the same kind used to size an A/B test, and it needs three inputs stated in plain terms before the formula: alpha (α, the significance level, the chance of concluding there is a real difference when there actually is not one, set to the conventional 0.05, or 5%), power (the chance of actually detecting the 1% difference given that it is really there, set to the conventional 80%), and a two-sided test (checking for a difference in either direction, RR having a higher or a lower failure rate than RC, rather than assuming which way it would go). zα/2 and zβ are simply the cutoff points on the standard normal distribution that correspond to those alpha and power choices; the z(p) function in the code below computes them directly rather than looking them up in a table. Using a standard two-proportion sample-size formula with a two-sided test at α=0.05 and 80% power:
import math
def z(p):
lo, hi = -10.0, 10.0
for _ in range(200):
mid = (lo + hi) / 2
cdf = 0.5 * (1 + math.erf(mid / math.sqrt(2)))
lo, hi = (mid, hi) if cdf < p else (lo, mid)
return (lo + hi) / 2
p1, p2 = 0.00, 0.01 # RC baseline (0, since RC cannot raise 40001) vs. RR rate to detect
alpha, power = 0.05, 0.80
z_alpha, z_beta = z(1 - alpha / 2), z(power)
p_bar = (p1 + p2) / 2
n = (z_alpha * math.sqrt(2*p_bar*(1-p_bar)) + z_beta * math.sqrt(p1*(1-p1)+p2*(1-p2))) ** 2 / (p2 - p1) ** 2
print(f"required committed transactions per arm: {math.ceil(n):,}")
Running this prints required committed transactions per arm: 780. So each of the RC and RR test runs needs at least 780 committed transactions touching the contended rows before "we saw zero failures" is a meaningful result rather than noise; below that, absence of evidence is not evidence of absence. This does not replace watching the real distribution during a canary; it just tells you how long the canary window needs to be before you trust a quiet one.
Rollback plan
- Pre-defined triggers: a sustained rise in
40001rate beyond the tolerance the retry logic was built for, p99 latency regression past SLA (service-level agreement, the target the team is contractually or operationally held to), or a throughput drop, sustained for more than a couple of minutes, not one noisy sample. - Immediate action:
ALTER DATABASE mydb SET default_transaction_isolation = 'read committed';reverts the default for new connections. This is not instant for existing traffic: PostgreSQL only applies a database-level default at the start of a new session, so pooled connections that are already open keep whatever isolation level was in effect when they connected. If the app uses a connection pooler (PgBouncer or similar, in session-pooling mode a client keeps the same backend connection for its whole session, while in transaction-pooling mode connections are handed out per transaction and a client's next transaction can land on a different backend session entirely), the rollback plan has to include recycling the pool (or issuing an explicitSET default_transaction_isolation = 'read committed'at the top of every pooled connection's init SQL) or the "rollback" will silently take minutes to actually take effect while errors keep climbing. - Drain the canary: stop routing the canary slice of traffic to the new setting; let in-flight RR transactions finish or abort naturally rather than force-killing them.
- Post-incident: capture
pg_stat_activityand the serialization-failure log lines from the incident window before they roll off, so the retry logic or the transaction shape (splitting a long read-modify-write into a shorter one, or adding explicit locking) can be redesigned before a second attempt.
Trade-offs and pitfalls
A workload that is entirely single-statement autocommit writes will show almost no difference between RC and RR, and a team that tests only that shape will wrongly conclude the change is free; the risk concentrates entirely in the minority of transactions that do a read followed by a dependent write. Testing with pgbench's default built-in script instead of a workload shaped like production traffic is the second-most common mistake: it exercises a different table layout and access pattern than the real system, so its serialization-failure rate does not transfer. Finally, count attempted transactions, not just successfully committed ones: once RR forces retries, the true load on the database (CPU, and WAL, the write-ahead log PostgreSQL appends to before applying any change) is higher than the committed-TPS number alone suggests, and a naive comparison of "TPS before vs. TPS after" can hide that the database is doing more total work per successful transaction.
A batch job reads from a table while another process is writing to it at the same time. What kinds of inconsistencies or locking issues can happen, and how would transaction isolation level, snapshot reads, or load timing affect what your query returns?
Sample Answer
Direct answer
The honest first move is to ask what point in time the read job's queries are actually anchored to, because that single fact determines everything else: whether it can see uncommitted data, whether it can see the same row differently twice, whether new rows can appear mid-run, and whether it can get blocked outright by the writer. There's no single "kind of inconsistency" here; there's a small set of distinct failure shapes, and which ones apply depends entirely on isolation level and on exactly when, relative to the writer, the read job's snapshot was taken.
Structured elaboration
Work through it in the order an interviewer would actually probe:
- Can the read job see data the writer hasn't committed yet? Only if the read runs under an isolation level that permits dirty reads. In practice, most production RDBMSs make this hard to hit even when nominally asked for (Postgres maps Read Uncommitted to Read Committed internally and never returns uncommitted data), but on an engine or configuration where it is possible, the read job could aggregate a value the writer later rolls back, corrupting the output with data that never really existed.
- If the read job touches the same row more than once, can it get two different answers? Yes, under Read Committed, if the writer commits a change between the read job's first and second look at that row: a non-repeatable read. A batch job that reads a summary count at the start of its run and a detail total at the end, expecting them to agree, is exactly the shape that breaks.
- If the read job re-runs the same filtered query, can the row set itself change? Yes, same mechanism, a phantom read: rows the writer inserted or deleted mid-run appear or disappear between two identical queries in the same read transaction, even though no row the job already looked at changed value.
- Does the timing of when the read job started, relative to the writer, matter even without any of the above? Yes, and this is the part that's easy to miss: under Read Committed, "start before the writer's transaction commits" and "start after" produce two completely different, individually consistent results, neither one wrong, just different snapshots of different moments. A batch job kicked off a few seconds earlier or later than usual can legitimately produce a different total purely from that timing, with no bug anywhere.
- Can the read job get physically blocked rather than just see stale or shifting data? Yes, if the writer holds a lock the read job's own statements need (this happens on engines whose stronger isolation levels take locks on plain reads, or if the writer itself holds row or table locks for schema-changing operations). That's a different failure mode entirely: not wrong data, but the read job hanging or timing out.
Worked example
Points 2 and 3 above are not speculative; both were reproduced against a live Postgres 16 database. For point 2 (same value, two different reads, one transaction): a transaction under Read Committed reads accounts.balance as 500.00, a concurrent transaction commits an update to 750.00 in between, and the first transaction's second read of the same row returns 750.00. For point 3 (same query, two different row sets): a transaction counts on_call = true rows and gets 2, a concurrent INSERT of a new on-call row commits, and the same count query re-run in the same transaction returns 3. Re-running both sequences under REPEATABLE READ instead produced the same answer both times in each case, confirming the fix is the isolation level, not anything about the query itself.
Trade-offs & pitfalls
- The instinct to blame "the batch job is buggy" when its output doesn't match a prior run is usually wrong; check the isolation level and the exact wall-clock window the job's transaction was open for, before assuming the query logic is at fault.
- Snapshot reads (Repeatable Read or better) remove failure modes 2 and 3 above entirely, at essentially no cost to a read-only job, since a reader that never writes has nothing to block on and nothing to abort for. There's rarely a good reason for a read-only batch job to run under Read Committed once Repeatable Read is available.
What is a database transaction, and why do COMMIT and ROLLBACK matter for keeping data correct? Walk through a concrete example, such as a batch data-load job, where a transaction boundary prevents partial or inconsistent data from landing in the table.
Sample Answer
Direct answer
A database transaction is a group of one or more SQL statements that the database treats as a single unit of work: either every statement in the group takes effect, or none of them do. COMMIT tells the engine "this unit succeeded, make it permanent." ROLLBACK tells it "abandon everything this unit has done so far." That boundary is what stops a multi-step operation that fails halfway through from leaving the table in whatever state the failure happened to catch it in.
Structured elaboration
- What opens and closes a transaction.
BEGIN(orSTART TRANSACTION) opens one; every statement after that runs inside it until an explicitCOMMITorROLLBACK. If you never issueBEGIN, most engines (Postgres, MySQL, SQL Server) run in autocommit mode: each individual statement is its own implicit transaction, committed the instant it succeeds. - Why the default is dangerous for multi-step work. Autocommit is fine for one
UPDATE. It is not fine for a loop that inserts several related rows per input record: without an explicit boundary, the engine will happily commit record 1's rows, then record 2's, and if record 3 violates a constraint it stops there, leaving records 1 and 2 permanently in the table with nothing recorded to say the run didn't finish. - What
COMMITguarantees (durability). Before the engine returns success fromCOMMIT, it has written a durable log record for the change (Postgres calls this the write-ahead log, or WAL) and forced that log to disk. Even if the process crashes a millisecond later, crash recovery replays the log and the row is still there. - What
ROLLBACKguarantees (atomicity). Every write the transaction made, however many statements it took, is discarded as if none of them ran. The table looks exactly like it did beforeBEGIN, and aSELECTfrom another session never saw the intermediate state.
Worked example
Consider a nightly job that loads new user signups into user_batch_load(id, email, signup_date), where email is NOT NULL. Three input rows arrive, and the third one has a bad record with a missing email (a real upstream data defect, the kind that shows up in production).
Without a transaction boundary (autocommit, one statement at a time, which is what you get if the loader just runs each INSERT on its own):
INSERT INTO user_batch_load VALUES (1, 'a@example.com', '2026-09-01');
INSERT INTO user_batch_load VALUES (2, 'b@example.com', '2026-09-01');
INSERT INTO user_batch_load VALUES (3, NULL, '2026-09-01');
Run against Postgres 16, the actual output is:
INSERT 0 1
INSERT 0 1
ERROR: null value in column "email" of relation "user_batch_load" violates not-null constraint
DETAIL: Failing row contains (3, null, 2026-09-01).
and SELECT * FROM user_batch_load afterward returns rows 1 and 2: the batch is half-loaded, and nothing in the table distinguishes "batch finished successfully with 2 rows" from "batch died partway through."
With an explicit transaction boundary, the same three statements wrapped in BEGIN ... on failure:
BEGIN;
INSERT INTO user_batch_load VALUES (1, 'a@example.com', '2026-09-01');
INSERT INTO user_batch_load VALUES (2, 'b@example.com', '2026-09-01');
INSERT INTO user_batch_load VALUES (3, NULL, '2026-09-01');
-- engine returns the same NOT NULL error, and the session is now in an
-- aborted-transaction state until you issue ROLLBACK (or just disconnect,
-- which implicitly rolls back)
SELECT * FROM user_batch_load afterward returns 0 rows. Both scenarios were run against the same table on the same data; the only difference is the boundary. Because the failed attempt left the table exactly as it was before the run, the retry (after the upstream data is fixed) can be the identical batch with no risk of double-counting rows 1 and 2 a second time.
Trade-offs & pitfalls
- Scope the boundary to the unit of work, not to each statement or to the whole job. Wrapping every single
INSERTin its own transaction defeats the point (autocommit already does that). Wrapping an entire multi-hour load in one transaction holds locks and keeps one long-running snapshot open the whole time, which blocks routine table maintenance and can make failure recovery slower, not safer. Commit in logically meaningful chunks (per input file, per batch of N records). - ORMs and connection pools sometimes leave autocommit on by default; a developer can assume there's an implicit transaction wrapping a request when there isn't. Check the framework's actual default rather than assuming.
- A transaction only undoes database writes. It does not undo side effects outside the database, an email already sent, a message already published to a queue, so a batch job with external side effects needs its own idempotency strategy on top of the DB transaction, not a substitute for one.
Walk through the SQL isolation levels: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE. For each level, describe which anomalies it prevents (dirty reads, non-repeatable reads, phantom reads), and give a short SQL snippet or scenario that demonstrates one anomaly.
Sample Answer
Direct answer
The SQL standard defines four isolation levels, each one permitting fewer of three named anomalies than the last: Read Uncommitted (may allow dirty reads, non-repeatable reads, and phantom reads), Read Committed (blocks dirty reads only), Repeatable Read (also blocks non-repeatable reads), and Serializable (blocks all three, and write skew besides). Higher isolation buys correctness at the cost of more blocking or more aborted-and-retried transactions, so the right level is the weakest one that still protects the invariant your transaction actually depends on.
Structured elaboration
A dirty read is seeing another transaction's uncommitted write. A non-repeatable read is reading the same row twice in one transaction and getting two different values because another transaction committed a change in between. A phantom read is re-running the same filtered query twice and getting a different set of rows because another transaction inserted or deleted a matching row in between.
| Isolation level | Dirty read | Non-repeatable read | Phantom read |
|---|---|---|---|
| Read Uncommitted | Possible (by the standard) | Possible | Possible |
| Read Committed | Prevented | Possible | Possible |
| Repeatable Read | Prevented | Prevented | Possible (by the standard) |
| Serializable | Prevented | Prevented | Prevented |
One caveat worth stating out loud in an interview: Postgres never actually implements Read Uncommitted as written. Running BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; and updating a row from one session, then reading it uncommitted from a second session at that level, still returns the last committed value, not the dirty one, because Postgres silently upgrades Read Uncommitted to Read Committed internally. The standard permits an engine to offer stronger guarantees than a level requires, and Postgres does that here; engines built on multiversion concurrency control (MVCC, keeping multiple versions of a row instead of overwriting it in place) in general tend to make dirty reads hard to produce even when asked for.
Worked example
A concrete non-repeatable read, run against Postgres 16 with two real interleaved sessions:
-- T1 (READ COMMITTED) -- T2
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT balance FROM accounts WHERE id = 1; -- returns 500.00
BEGIN;
UPDATE accounts SET balance = 750.00 WHERE id = 1;
COMMIT;
SELECT balance FROM accounts WHERE id = 1; -- returns 750.00 (!)
COMMIT;
Two SELECTs in the same transaction, same row, no write from T1 in between, and the value changed underneath it, that is the anomaly by definition. Re-running the identical sequence with REPEATABLE READ instead of READ COMMITTED on T1, both reads returned 500.00; T1's snapshot was fixed at the start of the transaction and did not move even though T2's write committed in between.
A second, less obvious point the anomaly table doesn't capture: isolation strength is not an all-or-nothing choice for a whole system. A single application often mixes levels deliberately: an inventory-and-purchase path (decrementing stock on checkout) needs strong protection because a lost decrement means overselling a physical item, while a page-view or "active users today" counter on the same schema can tolerate a much weaker level, because losing an occasional increment under load costs nothing but a slightly-off vanity metric. Treating every table in the schema as if it needed Serializable is a common overcorrection.
Trade-offs & pitfalls
- Write skew is real and none of the three named anomalies cover it. Two transactions can each read a consistent snapshot, each individually satisfy a business invariant based on what they saw, and still jointly violate the invariant when both commit, because neither transaction wrote a row the other read. Repeatable Read (even Postgres's stronger version) does not catch this; only true Serializable does. The fix is Serializable isolation or an explicit lock on the rows the invariant depends on.
- Detecting anomalies in a live production system is harder than in a two-session demo. A dirty read or lost update rarely throws an error; it shows up later as a number that's simply wrong (a report that doesn't reconcile, an inventory count that goes negative). Practically, that means instrumenting for it before it happens: log
pg_stat_activity.wait_eventand blocking chains during incidents, add a periodic reconciliation query for any invariant a transaction can't enforce directly, and treat "we changed nothing and the numbers moved" reports as a concurrency anomaly first, not a bug in the report.
List the four standard SQL isolation levels (read uncommitted, read committed, repeatable read, serializable) and for each, state which of the classic anomalies (dirty read, non-repeatable read, phantom read, write skew) it still permits. Which isolation level does PostgreSQL actually provide by default, and what does that guarantee in practice for a reader running concurrently with writers?
Sample Answer
Direct answer
Standard SQL (SQL-92) defines four isolation levels, weakest to strongest: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE. Each one is defined by which of the classic anomalies (dirty read, non-repeatable read, phantom read) it still permits; the stronger the level, the fewer anomalies survive, and the more the database has to work to rule them out. PostgreSQL's actual default is READ COMMITTED, and in practice that means every individual statement (not every transaction) sees a fresh snapshot of whatever was committed at the moment that statement started, so a reader never sees another transaction's uncommitted work, but two statements in the same transaction can legitimately see different data if a writer commits in between.
The four levels and what they permit
An anomaly here means a way concurrent transactions can produce a result that would be impossible if transactions ran strictly one at a time. Dirty read: seeing another transaction's uncommitted, possibly-about-to-be-rolled-back change. Non-repeatable read: re-reading the same row twice in one transaction and getting two different (both committed) answers because someone else's write landed in between. Phantom read: re-running the same filtered query twice in one transaction and getting a different set of rows, because someone else inserted or deleted a matching row in between.
| Level | Dirty read | Non-repeatable read | Phantom read | Typical use case |
|---|---|---|---|---|
| READ UNCOMMITTED | Permitted | Permitted | Permitted | Standard-allowed, but rarely implemented literally; see the PostgreSQL note below |
| READ COMMITTED | Prevented | Permitted | Permitted | Default for most OLTP (online transaction processing, the high-volume small-transaction workload behind typical apps) workloads: each statement sees committed-as-of-now data |
| REPEATABLE READ | Prevented | Prevented | Permitted (by the standard) | A multi-step read-then-write transaction that needs the data it reads to stay stable for the rest of the transaction, such as a batch job that reads a set of rows and later reconciles against that same set |
| SERIALIZABLE | Prevented | Prevented | Prevented | Correctness-critical multi-statement transactions where the combined effect of concurrent transactions must be equivalent to some one-at-a-time order, such as enforcing an invariant across more than one row (the write-skew anomaly) |
PostgreSQL's actual default, and what it guarantees
SHOW default_transaction_isolation; on a stock PostgreSQL 16 instance returns read committed. In practice that means: within one transaction, each new SQL statement gets its own fresh snapshot of the database as of the moment that statement begins, so a reader always sees a consistent, fully-committed view (never a partial or uncommitted write from another session), but it does not promise that two different statements in the same transaction see the same data, because a concurrent writer's commit lands between them.
-- T1
BEGIN ISOLATION LEVEL READ COMMITTED;
SELECT balance FROM accounts WHERE id = 1; -- returns 1000
-- T2 (runs to completion here)
BEGIN; UPDATE accounts SET balance = 900 WHERE id = 1; COMMIT;
-- back in T1
SELECT balance FROM accounts WHERE id = 1; -- returns 900: same transaction, different answer
COMMIT;
This was run against PostgreSQL 16.14 in a throwaway container and printed exactly 1000 then 900, which is the non-repeatable read that READ COMMITTED explicitly permits. Nothing in that sequence is a dirty read: T1 never saw T2's row while T2's transaction was still open; it only saw T2's value after T2 committed.
Trade-offs and pitfalls
One subtlety worth knowing cold: the SQL standard's table says REPEATABLE READ still permits phantom reads, but PostgreSQL's actual REPEATABLE READ is implemented as full-transaction snapshot isolation (the same mechanism SERIALIZABLE builds on, just without the extra conflict-detection layer), so in practice a PostgreSQL REPEATABLE READ transaction that re-runs the same filtered COUNT(*) twice gets the same answer both times, something a strictly standard-conforming engine would not guarantee. Do not assume this generalizes to every engine: MySQL's InnoDB storage engine also calls its default level REPEATABLE READ but achieves phantom protection for locking reads through gap locks, a different mechanism with different side effects (SQL Server is another engine that deviates from the standard's table in the other direction). The second pitfall is assuming READ UNCOMMITTED in PostgreSQL actually gives you dirty reads for a performance win: PostgreSQL accepts the READ UNCOMMITTED keyword but silently treats it exactly like READ COMMITTED (PostgreSQL has no genuinely lock-free dirty-read mode at all), so setting it buys nothing and should not be relied on for a "fast and loose" read path.
Unlock Full Question Bank
Get access to all 12 Transactions, Concurrency Control, and Isolation Levels interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.