postgresql/src
David Rowley 2ccd8fb29d Consider parallel awareness when removing single-child Appends
8edd0e794 added some code to remove Append and MergeAppend nodes when they
contained a single child node.  As it turned out, this was unsafe to do
when the Append/MergeAppend was parallel_aware and the child node was not.
Removing the Append/MergeAppend, in this case, could lead to the child plan
being called multiple times by parallel workers when it was unsafe to do
so.

Here we fix this by just not removing the Append/MergeAppend when the
parallel_aware flag of the parent and child node don't match.

Reported-by: Yura Sokolov
Bug: #17335
Discussion: https://postgr.es/m/b59605fecb20ba9ea94e70ab60098c237c870628.camel%40postgrespro.ru
Backpatch-through: 12, where 8edd0e794 was first introduced
2022-01-25 21:15:40 +13:00
..
backend Consider parallel awareness when removing single-child Appends 2022-01-25 21:15:40 +13:00
bin Avoid calling gettext() in signal handlers. 2022-01-17 13:30:04 -05:00
common Fix buffer overrun in unicode string normalization with empty input 2021-11-11 15:01:57 +09:00
fe_utils Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
include Fix limitations on what SQL commands can be issued to a walsender. 2022-01-24 15:33:34 -05:00
interfaces Fix race condition in gettext() initialization in libpq and ecpglib. 2022-01-21 15:36:29 -05:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Remove unneeded Python includes 2021-11-25 14:31:01 +01:00
port Stamp 12.9. 2021-11-08 17:02:19 -05:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:35 -05:00
test Flush table's relcache during ALTER TABLE ADD PRIMARY KEY USING INDEX. 2022-01-22 13:32:40 -05:00
timezone Update time zone data files to tzdata release 2021e. 2021-10-29 11:38:47 -04:00
tools Allow clean.bat to be run from anywhere 2022-01-20 10:21:02 -05:00
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:18 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Fix prove_installcheck to use correct paths when used with PGXS 2021-07-01 08:47:04 -04:00
Makefile.shlib Fix pkg-config files for static linking 2021-09-06 09:43:18 +02:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:05:50 +02:00