postgresql/src/backend
Tomas Vondra 6bc2769832 Error out when Gather Merge input is not sorted
To build Gather Merge path, the input needs to be sufficiently sorted.
Ensuring this is the responsibility of the code constructing the paths,
but create_gather_merge_plan tried to handle unsorted paths by adding
an explicit Sort. In light of the recent issues related to Incremental
Sort, this is rather fragile. Some of the expressions may be volatile
or parallel unsafe, in which case we can't add the Sort here.

We could do more checks and add the Sort in at least some cases, but
it seems cleaner to just error out and make it clear this is a bug in
code constructing those paths.

Author: James Coleman
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/CAAaqYe8cK3g5CfLC4w7bs%3DhC0mSksZC%3DH5M8LSchj5e5OxpTAg%40mail.gmail.com
Discussion: https://postgr.es/m/CAJGNTeNaxpXgBVcRhJX%2B2vSbq%2BF2kJqGBcvompmpvXb7pq%2BoFA%40mail.gmail.com
2020-12-15 23:19:41 +01:00
..
access Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
bootstrap Fix some stray whitespace in parser files 2020-11-11 17:37:18 +01:00
catalog Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
commands Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
executor Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
foreign Small code simplifications 2020-12-03 11:44:13 +01:00
jit Support subscripting of arbitrary types, not only arrays. 2020-12-09 12:40:37 -05:00
lib Use pg_bitutils for HyperLogLog. 2020-07-30 09:14:23 -07:00
libpq Convert elog(LOG) calls to ereport() where appropriate 2020-12-04 14:25:23 +01:00
main Remove -o option to postmaster 2020-11-10 13:15:01 +01:00
nodes Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
optimizer Error out when Gather Merge input is not sorted 2020-12-15 23:19:41 +01:00
parser Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
partitioning Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
po
port Fix -Wcast-function-type warnings on Windows/MinGW 2020-10-21 08:17:51 +02:00
postmaster Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
regex
replication Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
rewrite Improve wording of two error messages related to generated columns. 2020-11-23 11:15:12 -05:00
snowball
statistics Improve estimation of ANDs under ORs using extended statistics. 2020-12-08 20:10:11 +00:00
storage Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
tcop Refactor CLUSTER and REINDEX grammar to use DefElem for option lists 2020-12-03 10:13:21 +09:00
tsearch Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
utils Improve hash_create()'s API for some added robustness. 2020-12-15 11:38:53 -05:00
.gitignore
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile
nls.mk