Re: BUG #18824: Inconsistent results for isolation level settings

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: 2322370369(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18824: Inconsistent results for isolation level settings
Date: 2025-02-25 13:26:56
Message-ID: CAKAnmmLPh=1AW_oxRXouQ3VTTY57ie5yn7to9dTpaES=cMGCEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

From the docs at
https://www.postgresql.org/docs/current/sql-set-transaction.html:

The SET TRANSACTION command sets the characteristics of the current
> transaction. It has no effect on any subsequent transactions. SET SESSION
> CHARACTERISTICS sets the default transaction characteristics for
> subsequent transactions of a session

In practical usage, I rarely use SET SESSION, I prefer to set it at the
transaction level.

For your demo, try also examining SHOW default_transaction_isolation;

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Matthias Apitz 2025-02-25 13:30:29 Re: BUG #18822: mailing lists reject mails due to DKIM-signature
Previous Message Greg Sabino Mullane 2025-02-25 13:15:40 Re: Bug in copy