postgresql/src/backend
Thomas Munro 11c2d6fdf5 Parallel Hash Full Join.
Full and right outer joins were not supported in the initial
implementation of Parallel Hash Join because of deadlock hazards (see
discussion).  Therefore FULL JOIN inhibited parallelism, as the other
join strategies can't do that in parallel either.

Add a new PHJ phase PHJ_BATCH_SCAN that scans for unmatched tuples on
the inner side of one batch's hash table.  For now, sidestep the
deadlock problem by terminating parallelism there.  The last process to
arrive at that phase emits the unmatched tuples, while others detach and
are free to go and work on other batches, if there are any, but
otherwise they finish the join early.

That unfairness is considered acceptable for now, because it's better
than no parallelism at all.  The build and probe phases are run in
parallel, and the new scan-for-unmatched phase, while serial, is usually
applied to the smaller of the two relations and is either limited by
some multiple of work_mem, or it's too big and is partitioned into
batches and then the situation is improved by batch-level parallelism.

Author: Melanie Plageman <melanieplageman@gmail.com>
Author: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2BA6ftXPz4oe92%2Bx8Er%2BxpGZqto70-Q_ERwRaSyA%3DafNg%40mail.gmail.com
2023-03-31 11:34:03 +13:00
..
access pg_stat_wal: Accumulate time as instr_time instead of microseconds 2023-03-30 14:23:14 -07:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Simplify useless 0L constants 2023-03-29 08:25:12 +02:00
bootstrap Fix CREATE INDEX progress reporting for multi-level partitioning. 2023-03-25 15:34:03 -04:00
catalog Add new predefined role pg_create_subscription. 2023-03-30 11:37:19 -04:00
commands Add new predefined role pg_create_subscription. 2023-03-30 11:37:19 -04:00
executor Parallel Hash Full Join. 2023-03-31 11:34:03 +13:00
foreign Update copyright for 2023 2023-01-02 15:00:37 -05:00
jit SQL/JSON: add standard JSON constructor functions 2023-03-29 12:11:36 +02:00
lib Fix ILIST_DEBUG build 2023-01-18 10:26:15 -08:00
libpq Make SCRAM iteration count configurable 2023-03-27 09:46:29 +02:00
main Mark options as deprecated in usage output 2023-03-02 14:36:37 +01:00
nodes SQL/JSON: add standard JSON constructor functions 2023-03-29 12:11:36 +02:00
optimizer Parallel Hash Full Join. 2023-03-31 11:34:03 +13:00
parser Simplify transformJsonAggConstructor() API 2023-03-30 21:07:24 +02:00
partitioning Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
po meson: add install-{quiet, world} targets 2023-03-23 21:20:18 -07:00
port Update copyright for 2023 2023-01-02 15:00:37 -05:00
postmaster Comment on expectations for AutoVacuumWorkItem handlers. 2023-03-25 13:00:27 -07:00
regex Refactor to introduce pg_locale_deterministic(). 2023-02-23 11:17:41 -08:00
replication Add new predefined role pg_create_subscription. 2023-03-30 11:37:19 -04:00
rewrite Fix more bugs caused by adding columns to the end of a view. 2023-03-07 18:21:53 -05:00
snowball Update copyright for 2023 2023-01-02 15:00:37 -05:00
statistics Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
storage pg_stat_wal: Accumulate time as instr_time instead of microseconds 2023-03-30 14:23:14 -07:00
tcop Simplify useless 0L constants 2023-03-29 08:25:12 +02:00
tsearch Fix t_isspace(), etc., when datlocprovider=i and datctype=C. 2023-03-17 12:08:46 -07:00
utils pg_stat_wal: Accumulate time as instr_time instead of microseconds 2023-03-30 14:23:14 -07:00
.gitignore
Makefile Redesign archive modules 2023-02-17 14:26:42 +09:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
meson.build meson: Prevent installation of test files during main install 2023-03-03 07:45:52 +01:00
nls.mk NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00