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

From: 이현진 <jemie9812(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?
Date: 2025-03-31 04:44:10
Message-ID: CAH0WOV4JhR3OgjNg69h-ZY9o1ooWq=32aa4GrSL5a3y41nApHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I'm trying to understand how to replicate SQL Server's WITH (NOLOCK)
behavior in PostgreSQL.
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.

Would appreciate any insights or recommended approaches.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2025-03-31 05:02:18 Re: SQL Server's WITH (NOLOCK) equivalent in PostgreSQL?
Previous Message Tom Lane 2025-03-31 03:21:53 Re: Querying one partition in a function takes locks on all partitions