[COMMITTERS] pgsql: Fix confusion about number of subplans in partitioned INSERTset

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [COMMITTERS] pgsql: Fix confusion about number of subplans in partitioned INSERTset
Дата
Msg-id E1dKcWr-00045a-NF@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix confusion about number of subplans in partitioned INSERT setup.

ExecInitModifyTable() thought there was a plan per partition, but no,
there's only one.  The problem had escaped detection so far because there
would only be visible misbehavior if there were a SubPlan (not an InitPlan)
in the quals being duplicated for each partition.  However, valgrind
detected a bogus memory access in test cases added by commit 4f7a95be2,
and investigation of that led to discovery of the bug.  The additional
test case added here crashes without the patch.

Patch by Amit Langote, test case by me.

Discussion: https://postgr.es/m/10974.1497227727@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/78a030a441966d91bc7e932ef84da39c3ea7d970

Modified Files
--------------
src/backend/executor/nodeModifyTable.c    | 21 ++++++++++++++++-----
src/test/regress/expected/rowsecurity.out |  8 ++++++++
src/test/regress/sql/rowsecurity.sql      |  9 +++++++++
3 files changed, 33 insertions(+), 5 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: [COMMITTERS] pgsql: pg_dump: Fix harmless type mixup
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Apply RLS policies to partitioned tables.