Re: NOTIFY in multi-statement PQexec() not sent outside of transaction

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
Дата
Msg-id CAKFQuwb4OS74dBshrvB9Zu9V5ik5W2+5ja-tD0ieEK7LwZKWRQ@mail.gmail.com
обсуждение исходный текст
Ответ на NOTIFY in multi-statement PQexec() not sent outside of transaction  (John Muehlhausen <jgm@jgm.org>)
Ответы Re: NOTIFY in multi-statement PQexec() not sent outside of transaction  (John Muehlhausen <jgm@jgm.org>)
Список pgsql-bugs
On Monday, April 20, 2020, John Muehlhausen <jgm@jgm.org> wrote:

# docs seem to indicate that an implied transaction
# will not exist if there is an explicit begin/commit?
cur.execute(("notify __test; "
"begin; select pg_advisory_lock(7777); "
"select pg_advisory_unlock(7777); commit"))


A more comprehensive reading of the docs finds:

“ If the BEGIN follows some statements that were executed as an implicit transaction block, those statements are not immediately committed; in effect, they are retroactively included into the new regular transaction block. “.

David J.

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

Предыдущее
От: Roman Peshkurov
Дата:
Сообщение: Bug with memory leak on cert validation in libpq
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16378: Invalid memory access on interrupting CLUSTER after CREATE TEMP TABLE