postgresql/src/backend
Tomas Vondra 86b7cca72d Check parallel safety in generate_useful_gather_paths
Commit ebb7ae839d ensured we ignore pathkeys with volatile expressions
when considering adding a sort below a Gather Merge. Turns out we need
to care about parallel safety of the pathkeys too, otherwise we might
try sorting e.g. on results of a correlated subquery (as demonstrated
by a report from Luis Roberto).

Initial investigation by Tom Lane, patch by James Coleman. Backpatch
to 13, where the code was instroduced (as part of Incremental Sort).

Reported-by: Luis Roberto
Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13
Discussion: https://postgr.es/m/622580997.37108180.1604080457319.JavaMail.zimbra%40siscobra.com.br
Discussion: https://postgr.es/m/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.com
2020-12-21 18:29:49 +01:00
..
access Revert "Get rid of the dedicated latch for signaling the startup process". 2020-12-17 18:06:51 +09:00
bootstrap Fix some stray whitespace in parser files 2020-11-11 17:37:18 +01:00
catalog Multirange datatypes 2020-12-20 07:20:33 +03:00
commands Refactor logic to check for ASCII-only characters in string 2020-12-21 09:37:11 +09:00
executor Multirange datatypes 2020-12-20 07:20:33 +03: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 Check parallel safety in generate_useful_gather_paths 2020-12-21 18:29:49 +01:00
parser Multirange datatypes 2020-12-20 07:20:33 +03: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 Avoid memcpy() with same source and destination in pgstat_recv_replslot. 2020-12-20 12:38:32 -05:00
regex Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
replication Update comment atop of ReorderBufferQueueMessage(). 2020-12-19 10:08:46 +05:30
rewrite Improve wording of two error messages related to generated columns. 2020-11-23 11:15:12 -05:00
snowball code: replace most remaining uses of 'master'. 2020-07-08 13:24:35 -07:00
statistics Improve estimation of ANDs under ORs using extended statistics. 2020-12-08 20:10:11 +00:00
storage Revert "Get rid of the dedicated latch for signaling the startup process". 2020-12-17 18:06:51 +09: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 Fix compiler warning in multirange_constructor0() 2020-12-21 14:25:32 +03:00
.gitignore
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile
nls.mk