postgresql/src/include
Tom Lane e9e26b5e71 Invent "multibitmapsets", and use them to speed up antijoin detection.
Implement a data structure that is a List of Bitmapsets, which is
essentially a 2-D boolean array except that the rows need not all
be the same width.  Operations such as union and intersection are
meaningful for these, just as they are for Bitmapsets.  Eventually
we might build many of the same operations that we have written for
Bitmapsets, but for the first use-case we just need a few.

That first use-case is for antijoin detection: reduce_outer_joins
needs to find the set of Vars that are certain to be non-null in a
successfully joined (not null-extended) left join row, and also
find the set of Vars subject to higher-level IS NULL constraints,
and intersect them.  We had been doing this by making Lists of
the Var nodes and then using list_intersect, which works but is
pretty inefficient compared to a bitmapset-like intersection.
Potentially it's O(N^2) if there are a lot of Vars involved,
which fortunately there generally aren't; still it's not great.
Moreover, that method requires the Vars of interest to be exactly
equal() in the join condition and the upper IS NULL condition,
which is problematic for my WIP patch that labels Vars according
to which outer joins have possibly nulled them.

Discussion: https://postgr.es/m/892228.1668437838@sss.pgh.pa.us
Discussion: https://postgr.es/m/CAMbWs4-mvPPCJ1W6iK6dD5HiNwoJdi6mZp=-7mE8N9Sh+cd0tQ@mail.gmail.com
2022-11-16 13:58:44 -05:00
..
access Variable renaming in preparation for refactoring 2022-11-16 16:40:34 +01:00
backup Reduce basebackup_sink.h inclusion footprint 2022-10-12 09:42:20 +02:00
bootstrap Harmonize more lexer function parameter names. 2022-09-22 13:27:16 -07:00
catalog Fix volatility marking of timestamptz_trunc_zone. 2022-11-12 13:29:52 -05:00
commands Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31. 2022-11-04 10:39:52 -04:00
common Introduce pg_pwrite_zeros() in fileutils.c 2022-11-08 12:23:46 +09:00
datatype Fix overflow hazards in interval input and output conversions. 2022-04-02 16:12:29 -04:00
executor Remove AssertArg and AssertState 2022-10-28 09:19:06 +02:00
fe_utils Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
foreign Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
jit Add central declarations for dlsym()ed symbols 2022-07-17 17:23:42 -07:00
lib Add casts to simplehash.h to silence C++ warnings. 2022-11-03 10:47:31 -04:00
libpq Invent open_auth_file() in hba.c to refactor authentication file opening 2022-11-14 10:21:42 +09:00
mb Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
nodes Invent "multibitmapsets", and use them to speed up antijoin detection. 2022-11-16 13:58:44 -05:00
optimizer Revert "Optimize order of GROUP BY keys". 2022-10-03 10:56:16 -04:00
parser Record dependencies of a cast on other casts that it requires. 2022-10-17 14:02:05 -04:00
partitioning Resolve partition strategy during early parsing 2022-11-03 16:25:54 +01:00
pch meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
port mingw: Define PGDLLEXPORT as __declspec (dllexport) as done for msvc 2022-09-30 10:50:05 -07:00
portability Fix obsolete comments in instr_time.h. 2022-08-09 11:50:03 +12:00
postmaster Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
regex Consistently use named parameters in regex code. 2022-09-19 15:10:24 -07:00
replication Add doubly linked count list implementation 2022-11-02 14:06:05 +13:00
rewrite Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
snowball Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
statistics Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
storage Allow use of __sync_lock_test_and_set for spinlocks on any machine. 2022-11-02 17:37:29 -04:00
tcop Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
tsearch Introduce t_isalnum() to replace t_isalpha() || t_isdigit() tests. 2022-10-06 11:08:56 -04:00
utils Refactor aclcheck functions 2022-11-13 09:02:41 +01:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
Makefile Move gramparse.h to src/backend/parser 2022-09-14 10:57:13 +07:00
c.h Make AssertPointerAlignment available to frontend code 2022-11-03 12:04:22 -04:00
fmgr.h Mark all symbols exported from extension libraries PGDLLEXPORT. 2022-07-17 18:50:14 -07:00
funcapi.h Remove compatibility declarations for InitMaterializedSRF() 2022-10-18 10:44:02 +09:00
getopt_long.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
meson.build meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
miscadmin.h Remove AssertArg and AssertState 2022-10-28 09:19:06 +02:00
pg_config.h.in Remove configure probe for sockaddr_in6 and require AF_INET6. 2022-08-26 10:18:30 +12:00
pg_config_ext.h.in
pg_config_ext.h.meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_config_manual.h Remove our artificial PG_SOMAXCONN limit on listen queue length. 2022-08-23 10:15:06 -04:00
pg_getopt.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pg_trace.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat.h pgstat: Track time of the last scan of a relation 2022-10-14 11:11:34 -07:00
pgtar.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtime.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
port.h pg_basebackup: Fix cross-platform tablespace relocation. 2022-10-21 08:21:55 -04:00
postgres.h Simplify our Assert infrastructure a little. 2022-10-10 15:16:56 -04:00
postgres_ext.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
postgres_fe.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
windowapi.h Update copyright for 2022 2022-01-07 19:04:57 -05:00