aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-01-25 21:15:00 +1300
committerDavid Rowley <drowley@postgresql.org>2022-01-25 21:15:00 +1300
commitf8807e7742e5ce058b6fe05d797852e082e6d2c8 (patch)
treeaa3108b3ffc85b562a1db578388c8be972362b4c /src/backend/parser/parse_expr.c
parent35893cc96856ae191fbe5c639a542117c0479880 (diff)
downloadpostgresql-f8807e7742e5ce058b6fe05d797852e082e6d2c8.tar.gz
postgresql-f8807e7742e5ce058b6fe05d797852e082e6d2c8.zip
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
Diffstat (limited to 'src/backend/parser/parse_expr.c')
0 files changed, 0 insertions, 0 deletions