pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: 2322370369@qq.com
Subject: BUG #18824: Inconsistent results for isolation level settings
Date: Tue, 25 Feb 2025 04:15:02 +0000
Message-ID: <18824-f284bcfedb55f48d@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18824
Logged by:          dlyixue
Email address:      2322370369@qq.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)



view thread (2+ messages)  latest in thread

Message-ID: <18824-f284bcfedb55f48d@postgresql.org>
Permalink:  ../18824-f284bcfedb55f48d@postgresql.org/
Also on:    postgresql.org/message-id/18824-f284bcfedb55f48d@postgresql.org

 · 

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: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, 2322370369@qq.com
  Subject: Re: BUG #18824: Inconsistent results for isolation level settings
  In-Reply-To: <18824-f284bcfedb55f48d@postgresql.org>

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

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