Re: SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: 이현진 <jemie9812(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?
Date: 2025-03-31 05:02:18
Message-ID: C53D7011-110C-4C78-A293-76355C1B2654@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Mar 30, 2025, at 21:44, 이현진 <jemie9812(at)gmail(dot)com> wrote:
> Since PostgreSQL uses MVCC, I'm wondering what the best practice is for non-blocking reads,
> and whether there's an equivalent to dirty reads or READ UNCOMMITTED.

There are two different questions here.

1. Reads are not blocked in PostgreSQL by writers, even if another transaction has updated the row but not yet committed.

2. There is no equivalent of a dirty read in PostgreSQL. You can only read committed data (short of bypassing the database and reading the disk directly).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2025-03-31 05:10:54 Re: SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?
Previous Message 이현진 2025-03-31 04:44:10 SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?