| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Narek Galstyan <narek(dot)galstyan(at)enterprisedb(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Bug report and fix for: COMMIT/ROLLBACK AND CHAIN after an error drops the isolation level |
| Date: | 2026-11-12 05:02:08 |
| Message-ID: | avVIUKaIlwdfHQwM@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Nov 11, 2026 at 04:48:31PM +0900, Michael Paquier wrote:
> Do we have other blocks where we may want to case about a restore of
> the state and some of the characteristics? I have not double-checked,
> but...
There was a second problem here. See this sequence:
START TRANSACTION READ WRITE;
SAVEPOINT x;
SET TRANSACTION READ ONLY;
COMMIT AND CHAIN;
-- true on HEAD, should be false.
SHOW transaction_read_only;
When chaining to the second transaction with the chain, the second
transaction inherited the READ ONLY state coming from the
subtransaction created in the first transaction instead of using READ
WRITE from the first top transaction. Among deferrable, read_only and
isolation, read_only is the only one that a savepoint can change, as
far as I can see.
A couple of edits later, I finish with the attached.
Thoughts or comments?
--
Michael
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Fix-some-edge-cases-with-characteristics-after-CO.patch | text/plain | 6.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | shveta malik | 2026-11-12 04:44:39 | Re: Crashes on a partition whose concurrent detach never finished |