pgsql: Abstract logic to allow for multiple kinds of child rels.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Abstract logic to allow for multiple kinds of child rels.
Дата
Msg-id E1cvElT-0001ha-DK@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Abstract logic to allow for multiple kinds of child rels.

Currently, the only type of child relation is an "other member rel",
which is the child of a baserel, but in the future joins and even
upper relations may have child rels.  To facilitate that, introduce
macros that test to test for particular RelOptKind values, and use
them in various places where they help to clarify the sense of a test.
(For example, a test may allow RELOPT_OTHER_MEMBER_REL either because
it intends to allow child rels, or because it intends to allow simple
rels.)

Also, remove find_childrel_top_parent, which will not work for a
child rel that is not a baserel.  Instead, add a new RelOptInfo
member top_parent_relids to track the same kind of information in a
more generic manner.

Ashutosh Bapat, slightly tweaked by me.  Review and testing of the
patch set from which this was taken by Rajkumar Raghuwanshi and Rafia
Sabih.

Discussion: http://postgr.es/m/CA+TgmoagTnF2yqR3PT2rv=om=wJiZ4-A+ATwdnriTGku1CLYxA@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7a39b5e4d11229ece930a51fd7cb29e535db4494

Modified Files
--------------
contrib/postgres_fdw/deparse.c          | 42 +++++++++++----------------
contrib/postgres_fdw/postgres_fdw.c     | 25 ++++++++--------
src/backend/foreign/foreign.c           |  6 ++--
src/backend/optimizer/path/allpaths.c   |  7 +++--
src/backend/optimizer/path/equivclass.c | 19 ++++++++----
src/backend/optimizer/path/indxpath.c   |  3 ++
src/backend/optimizer/plan/createplan.c |  2 +-
src/backend/optimizer/plan/initsplan.c  |  2 +-
src/backend/optimizer/plan/planmain.c   |  3 +-
src/backend/optimizer/plan/planner.c    |  2 +-
src/backend/optimizer/prep/prepunion.c  |  4 +--
src/backend/optimizer/util/plancat.c    |  3 ++
src/backend/optimizer/util/relnode.c    | 51 ++++++++++++++-------------------
src/backend/utils/adt/selfuncs.c        |  2 +-
src/include/nodes/relation.h            | 20 +++++++++++++
src/include/optimizer/pathnode.h        |  3 +-
16 files changed, 104 insertions(+), 90 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Properly acquire buffer lock for page-at-a-time hash vacuum.
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Print new RelOptInfo field top_parent_relids in outfuncs.c