pgsql: Fix error-cleanup mistakes in exec_stmt_call().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix error-cleanup mistakes in exec_stmt_call().
Дата
Msg-id E1gLJZQ-0001sN-F5@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix error-cleanup mistakes in exec_stmt_call().

Commit 15c729347 was a couple bricks shy of a load: we need to
ensure that expr->plan gets reset to NULL on any error exit,
if it's not supposed to be saved.  Also ensure that the
stmt->target calculation gets redone if needed.

The easy way to exhibit a problem is to set up code that
violates the writable-argument restriction and then execute
it twice.  But error exits out of, eg, setup_param_list()
could also break it.  Make the existing PG_TRY block cover
all of that code to be sure.

Per report from Pavel Stehule.

Discussion: https://postgr.es/m/CAFj8pRAeXNTO43W2Y0Cn0YOVFPv1WpYyOqQrrzUiN6s=dn7gCg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f26c06a4046b62c04ab4a8ef8632a5f705b6dd2d

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 82 ++++++++++++++++++++++++--------------------
1 file changed, 45 insertions(+), 37 deletions(-)


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

Предыдущее
От: David Steele
Дата:
Сообщение: Re: pgsql: Make WAL segment size configurable at initdb time.
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: docs: Adapt wal_segment_size docs to fc49e24fa69.