Re: SPI isolation changes

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: SPI isolation changes
Дата
Msg-id b5eacfb7-ea65-64c2-1a5a-459341ee16b7@iki.fi
обсуждение исходный текст
Ответ на SPI isolation changes  (Seino Yuki <seinoyu@oss.nttdata.com>)
Ответы Re: SPI isolation changes
Список 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)




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Karina Litskevich
Дата:
Сообщение: Re: Avoid unused value (src/fe_utils/print.c)
Следующее
От: Seino Yuki
Дата:
Сообщение: Re: SPI isolation changes