public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: David G. Johnston <[email protected]>
To: 이현진 <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?
Date: Mon, 31 Mar 2025 09:58:41 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwYCj-gXZuyrwpP-jycbgH2_HmEsNWvJNDqr0WT2fEp8_A@mail.gmail.com>
References: <CAH0WOV4JhR3OgjNg69h-ZY9o1ooWq=32aa4GrSL5a3y41nApHQ@mail.gmail.com>
	<CAKFQuwYCj-gXZuyrwpP-jycbgH2_HmEsNWvJNDqr0WT2fEp8_A@mail.gmail.com>

On Sun, 2025-03-30 at 22:10 -0700, David G. Johnston wrote:
> On Sunday, March 30, 2025, 이현진 <[email protected]> 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.
> 
> https://www.postgresql.org/docs/current/transaction-iso.html
> 
> We are unable to implement read uncommitted because of our choice to implement MVCC.

Perhaps it would be better to say "there is no need to implement a READ UNCOMMITTED
isolation level that actually allows for dirty reads".  On databases like SQL Server
you don't use READ UNCOMMITTED because you desperately want to see dirty, inconsistent
data.  It is just something you have to accept in order to avoid read locks.

Since PostgreSQL doesn't use read locks, there is no need for that.

Yours,
Laurenz Albe






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox