Re: SPI isolation changes

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Seino Yuki <seinoyu(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: SPI isolation changes
Date: 2023-06-30 14:26:57
Message-ID: b5eacfb7-ea65-64c2-1a5a-459341ee16b7@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30/06/2023 17:15, Seino Yuki wrote:
> Hi,
>
> When I read the documents and coding of SPI, [1]
> I found that the following the SPI_start_transaction does not support
> transaciton_mode(ISOLATION LEVEL, READ WRITE/READ ONLY) like BEGIN
> command. [2]
> Is there a reason for this?

Per the documentation for SPI_start_transaction that you linked to:

"SPI_start_transaction does nothing, and exists only for code
compatibility with earlier PostgreSQL releases."

I haven't tested it, but perhaps you can do "SET TRANSACTION ISOLATION
LEVEL" in the new transaction after calling SPI_commit() though. Or "SET
DEFAULT TRANSACTION ISOLATION LEVEL" before committing.

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Seino Yuki 2023-06-30 14:56:48 Re: SPI isolation changes
Previous Message Karina Litskevich 2023-06-30 14:25:49 Re: Avoid unused value (src/fe_utils/print.c)