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(-)
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера