]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Update parallel BTree scan state when the scan keys can't be satisfied.
authorAmit Kapila <akapila@postgresql.org>
Thu, 17 Sep 2020 09:46:46 +0000 (15:16 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 17 Sep 2020 10:23:25 +0000 (15:53 +0530)
commit956891faba7d3036907922266f19a9fb7140363d
tree6a8db83c52d53d2a91c277717e47690dbde62a71
parent2c74f7139edd095d931cbed513aa9881c3540a22
Update parallel BTree scan state when the scan keys can't be satisfied.

For parallel btree scan to work for array of scan keys, it should reach
BTPARALLEL_DONE state once for every distinct combination of array keys.
This is required to ensure that the parallel workers don't try to seize
blocks at the same time for different scan keys. We missed to update this
state when we discovered that the scan keys can't be satisfied.

Author: James Hunter
Reviewed-by: Amit Kapila
Tested-by: Justin Pryzby
Backpatch-through: 10, where it was introduced
Discussion: https://postgr.es/m/4248CABC-25E3-4809-B4D0-128E1BAABC3C@amazon.com
src/backend/access/nbtree/nbtsearch.c