postgresql/src/include
Tom Lane 2f17b57017 Improve performance of adjust_appendrel_attrs_multilevel.
The present implementations of adjust_appendrel_attrs_multilevel and
its sibling adjust_child_relids_multilevel are very messy, because
they work by reconstructing the relids of the child's immediate
parent and then seeing if that's bms_equal to the relids of the
target parent.  Aside from being quite inefficient, this will not
work with planned future changes to make joinrels' relid sets
contain outer-join relids in addition to baserels.

The whole thing can be solved at a stroke by adding explicit parent
and top_parent links to child RelOptInfos, and making these functions
work with RelOptInfo pointers instead of relids.  Doing that is
simpler for most callers, too.

In my original version of this patch, I got rid of
RelOptInfo.top_parent_relids on the grounds that it was now redundant.
However, that adds a lot of code churn in places that otherwise would
not need changing, and arguably the extra indirection needed to fetch
top_parent->relids in those places costs something.  So this version
leaves that field in place.

Discussion: https://postgr.es/m/553080.1657481916@sss.pgh.pa.us
2022-08-18 12:36:16 -04:00
..
access Add missing parenthesis to max item size macro. 2022-08-05 13:06:19 -07:00
backup Move basebackup code to new directory src/backend/backup 2022-08-10 14:03:23 -04:00
bootstrap Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
catalog In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
commands Fix comment in copyfrom_internal.h 2022-08-06 21:13:45 +09:00
common Remove replacement code for getaddrinfo. 2022-08-14 09:53:28 +12:00
datatype Fix overflow hazards in interval input and output conversions. 2022-04-02 16:12:29 -04:00
executor Remove unused fields from ExprEvalStep 2022-08-03 09:46:02 +12:00
fe_utils Add xheader_width pset option to psql 2022-07-25 14:25:02 -04:00
foreign Update copyright for 2022 2022-01-07 19:04:57 -05:00
jit Add central declarations for dlsym()ed symbols 2022-07-17 17:23:42 -07:00
lib Add missing inequality searches to rbtree 2022-07-08 22:00:03 +03:00
libpq Remove configure probe for netinet/tcp.h. 2022-08-18 16:31:11 +12:00
mb Simplify coding style of is_valid_ascii() 2022-08-05 16:50:22 +07:00
nodes Improve performance of adjust_appendrel_attrs_multilevel. 2022-08-18 12:36:16 -04:00
optimizer Improve performance of adjust_appendrel_attrs_multilevel. 2022-08-18 12:36:16 -04:00
parser Update comment in gramparse.h 2022-08-18 09:45:05 +07:00
partitioning Have ExecFindPartition cache the last found partition 2022-08-02 09:55:27 +12:00
port Remove configure probe for netinet/tcp.h. 2022-08-18 16:31:11 +12:00
portability Fix obsolete comments in instr_time.h. 2022-08-09 11:50:03 +12:00
postmaster Add central declarations for dlsym()ed symbols 2022-07-17 17:23:42 -07:00
regex Remove configure probe for wctype.h. 2022-07-23 16:54:00 +12:00
replication Remove replacement code for getaddrinfo. 2022-08-14 09:53:28 +12:00
rewrite Update copyright for 2022 2022-01-07 19:04:57 -05:00
snowball Update copyright for 2022 2022-01-07 19:04:57 -05:00
statistics Add stxdinherit flag to pg_statistic_ext_data 2022-01-16 13:38:01 +01:00
storage Remove configurability of PPC spinlock assembly code. 2022-08-13 13:36:39 -04:00
tcop Allow event trigger table_rewrite for ALTER MATERIALIZED VIEW 2022-08-17 14:55:20 +09:00
tsearch Remove configure probe for wctype.h. 2022-07-23 16:54:00 +12:00
utils Remove configure probe for sys/resource.h and refactor. 2022-08-14 00:09:47 +12:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Remove configure probes for sys/un.h and struct sockaddr_un. 2022-08-14 00:09:47 +12:00
fmgr.h Mark all symbols exported from extension libraries PGDLLEXPORT. 2022-07-17 18:50:14 -07:00
funcapi.h Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
getopt_long.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Install generated nodes/nodetags.h 2022-07-09 10:20:23 +02:00
miscadmin.h Process session_preload_libraries within InitPostgres's transaction. 2022-07-25 10:27:43 -04:00
pg_config.h.in Remove configure probe for netinet/tcp.h. 2022-08-18 16:31:11 +12:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Remove configurability of PPC spinlock assembly code. 2022-08-13 13:36:39 -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 Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pgtar.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtime.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
port.h Remove HAVE_UNIX_SOCKETS. 2022-08-14 08:46:53 +12:00
postgres.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
postgres_ext.h Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -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