postgresql/src/backend
Tom Lane 78a030a441 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
2017-06-12 23:29:53 -04:00
..
access Formatting improvements in config file samples 2017-06-09 14:38:33 -04:00
bootstrap Disallow CREATE INDEX if table is already in use in current session. 2017-06-04 12:02:41 -04:00
catalog Assert that we don't invent relfilenodes or type OIDs in binary upgrade. 2017-06-12 20:04:32 -04:00
commands Fix ALTER SEQUENCE OWNED BY to not rewrite the sequence relation. 2017-06-12 16:57:31 -04:00
executor Fix confusion about number of subplans in partitioned INSERT setup. 2017-06-12 23:29:53 -04:00
foreign Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
lib Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
libpq Improve authentication error messages. 2017-06-08 19:54:22 +03:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Fix omission of locations in outfuncs/readfuncs partitioning node support. 2017-05-30 11:32:41 -04:00
optimizer #ifdef out assorted unused GEQO code. 2017-06-04 13:34:05 -04:00
parser Handle unqualified SEQUENCE NAME options properly in parse_utilcmd.c. 2017-06-11 19:00:01 -04:00
po Translation updates 2017-05-15 12:19:54 -04:00
port Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
postmaster Clean up latch related code. 2017-06-06 16:13:00 -07:00
regex Fix regexport.c to behave sanely with lookaround constraints. 2017-04-13 17:18:35 -04:00
replication Improve tablesync behavior with concurrent changes 2017-06-09 09:20:54 -04:00
rewrite Apply RLS policies to partitioned tables. 2017-06-11 08:51:18 -07:00
snowball Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
statistics Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
storage Fix typo 2017-06-09 11:40:08 -04:00
tcop Use standard interrupt handling in logical replication launcher. 2017-06-08 15:38:50 -07:00
tsearch Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
utils Formatting improvements in config file samples 2017-06-09 14:38:33 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
common.mk Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00