postgresql/src
Tom Lane fac31b2cd4 Prevent parallel index build in a standalone backend.
This can't work if there's no postmaster, and indeed the code got an
assertion failure trying.  There should be a check on IsUnderPostmaster
gating the use of parallelism, as the planner has for ordinary
parallel queries.

Commit 40d964ec9 got this right, so follow its model of checking
IsUnderPostmaster at the same place where we check for
max_parallel_maintenance_workers == 0.  In general, new code
implementing parallel utility operations should do the same.

Report and patch by Yulin Pei, cosmetically adjusted by me.
Back-patch to v11 where this code came in.

Discussion: https://postgr.es/m/HK0PR01MB22747D839F77142D7E76A45DF4F50@HK0PR01MB2274.apcprd01.prod.exchangelabs.com
2020-11-30 14:38:00 -05:00
..
backend Prevent parallel index build in a standalone backend. 2020-11-30 14:38:00 -05:00
bin Fix recently-introduced breakage in psql's \connect command. 2020-11-29 15:22:04 -05:00
common Second thoughts on TOAST decompression. 2020-11-02 11:25:18 -05:00
fe_utils Remove incorrect %s in string 2020-11-09 10:38:43 +01:00
include Properly check index mark/restore in ExecSupportsMarkRestore. 2020-11-24 21:16:58 +00:00
interfaces Translation updates 2020-11-09 12:34:05 +01:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Translation updates 2020-11-09 12:34:05 +01:00
port Clear some style deviations. 2020-05-21 08:31:16 -07:00
template On macOS, use -isysroot in link steps as well as compile steps. 2020-11-20 00:58:26 -05:00
test Fix miscomputation of direct_lateral_relids for join relations. 2020-11-30 12:22:43 -05:00
timezone Update time zone data files to tzdata release 2020d. 2020-10-22 21:24:01 -04:00
tools Sync our copy of the timezone library with IANA release tzcode2020c. 2020-10-16 21:40:16 -04:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Update Unicode data to Unicode 13.0.0 and CLDR 37 2020-04-24 09:52:59 +02:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00