postgresql/src
Robert Haas f120b614e0 plpgsql: Don't generate parallel plans for RETURN QUERY.
Commit 7aea8e4f2d allowed a parallel
plan to be generated when for a RETURN QUERY or RETURN QUERY EXECUTE
statement in a PL/pgsql block, but that's a bad idea because plplgsql
asks the executor for 50 rows at a time.  That means that we'll always
be running serially a plan that was intended for parallel execution,
which is not a good idea.  Fix by not requesting a parallel plan from
the outset.

Per discussion, back-patch to 9.6.  There is a slight risk that, due
to optimizer error, somebody could have a case where the parallel plan
executed serially is actually faster than the supposedly-best serial
plan, but the consensus seems to be that that's not sufficient
justification for leaving 9.6 unpatched.

Discussion: http://postgr.es/m/CA+TgmoZ_ZuH+auEeeWnmtorPsgc_SmP+XWbDsJ+cWvWBSjNwDQ@mail.gmail.com
Discussion: http://postgr.es/m/CA+TgmobXEhvHbJtWDuPZM9bVSLiTj-kShxQJ2uM5GPDze9fRYA@mail.gmail.com
2017-03-24 12:30:39 -04:00
..
backend Add a txid_status function. 2017-03-24 12:00:53 -04:00
bin ICU support 2017-03-23 15:28:48 -04:00
common Sync pg_dump and pg_dumpall output 2017-03-22 10:20:13 -04:00
fe_utils Spelling fixes in code comments 2017-03-14 12:58:39 -04:00
include Add a txid_status function. 2017-03-24 12:00:53 -04:00
interfaces Add missed "make clean" logic in src/interfaces/libpq/Makefile. 2017-03-20 12:51:45 -04:00
makefiles Try to fix non-MSVC Windows builds in the wake of logical replication. 2017-01-20 12:51:31 -05:00
pl plpgsql: Don't generate parallel plans for RETURN QUERY. 2017-03-24 12:30:39 -04:00
port Fix and simplify check for whether we're running as Windows service. 2017-03-17 11:14:01 +02:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Add a txid_status function. 2017-03-24 12:00:53 -04:00
timezone Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
tools Remove createlang and droplang 2017-03-23 14:16:45 -04:00
tutorial Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
.gitignore
DEVELOPERS
Makefile Remove redundant coverage target 2017-02-17 08:56:57 -05:00
Makefile.global.in ICU support 2017-03-23 15:28:48 -04:00
Makefile.shlib Fix typos in comments. 2017-02-06 11:33:58 +02:00
bcc32.mak
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak