BUG #18824: Inconsistent results for isolation level settings

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: 2322370369(at)qq(dot)com
Subject: BUG #18824: Inconsistent results for isolation level settings
Date: 2025-02-25 04:15:02
Message-ID: 18824-f284bcfedb55f48d@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18824
Logged by: dlyixue
Email address: 2322370369(at)qq(dot)com
PostgreSQL version: 17.3
Operating system: Ubuntu 22.04
Description:

When I was trying to set the isolation level, I realized that different
methods of setting the same isolation level gave inconsistent results.
This makes me wonder if the current setting is taking effect.
In my opinion, use case 1 and use case 2 should have the same results. Why
are the results of the queries different?
Is this a design problem? I feel like the documentation needs to explain the
difference as well.

The test cases are as follows:
Case 1:
reproduce=# BEGIN;
BEGIN
reproduce=*# SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL
SERIALIZABLE;
SET
reproduce=*# SHOW TRANSACTION ISOLATION LEVEL;
transaction_isolation
-----------------------
read committed
(1 row)

Case 2:
reproduce=# BEGIN;
BEGIN
reproduce=*# SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET
reproduce=*# SHOW TRANSACTION ISOLATION LEVEL;
transaction_isolation
-----------------------
serializable
(1 row)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message me nefcanto 2025-02-25 06:46:28 Re: Bug in copy
Previous Message Kashaela Ransaw 2025-02-25 01:41:48 Re: error -10825