Re: Unexpected results from CALL and AUTOCOMMIT=off

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Unexpected results from CALL and AUTOCOMMIT=off
Дата
Msg-id Zl91WPpX2KElTZbb@nathan
обсуждение исходный текст
Ответ на Re: Unexpected results from CALL and AUTOCOMMIT=off  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Unexpected results from CALL and AUTOCOMMIT=off
Список pgsql-hackers
On Tue, Jun 04, 2024 at 02:28:43PM -0400, Tom Lane wrote:
> Actually, after poking around some more I found that there *is* a way
> to deal with this within spi.c: we can make _SPI_execute_plan ignore
> options->allow_nonatomic unless the SPI_OPT_NONATOMIC flag was given
> when connecting.
> 
> I like this better than my first solution because (a) it seems to
> make the allow_nonatomic flag behave in a more intuitive way;
> (b) spi.c gates some other behaviors on SPI_OPT_NONATOMIC, so that
> gating this one too seems more consistent, and (c) this way, we fix
> not only plpgsql but anything that has copied its coding pattern.

+1

> Hence, new patch attached, now with docs and tests.  Barring
> objections I'll push this one.

Should we expand the documentation for SPI_connect_ext() to note that
SPI_execute_extended()/SPI_execute_plan_extended() depend on the flag?

-- 
nathan



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: use CREATE DATABASE STRATEGY = FILE_COPY in pg_upgrade
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unexpected results from CALL and AUTOCOMMIT=off