pgsql: Add a relkind field to RangeTblEntry to avoid some syscache look

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add a relkind field to RangeTblEntry to avoid some syscache look
Date: 2011-02-23 00:25:25
Message-ID: E1Ps2Xl-0000sr-QG@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add a relkind field to RangeTblEntry to avoid some syscache lookups.

The recent additions for FDW support required checking foreign-table-ness
in several places in the parse/plan chain. While it's not clear whether
that would really result in a noticeable slowdown, it seems best to avoid
any performance risk by keeping a copy of the relation's relkind in
RangeTblEntry. That might have some other uses later, anyway.
Per discussion.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bdca82f44d0e0168dece56cbd53b54ba142f328f

Modified Files
--------------
src/backend/catalog/dependency.c | 1 +
src/backend/commands/copy.c | 1 +
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/equalfuncs.c | 1 +
src/backend/nodes/nodeFuncs.c | 2 -
src/backend/nodes/outfuncs.c | 2 +-
src/backend/nodes/print.c | 8 +---
src/backend/nodes/readfuncs.c | 2 +-
src/backend/optimizer/path/allpaths.c | 67 +++++++++++++++++----------------
src/backend/optimizer/plan/planner.c | 3 +-
src/backend/parser/analyze.c | 23 +++--------
src/backend/parser/parse_relation.c | 2 +
src/backend/parser/parse_target.c | 2 -
src/backend/rewrite/rewriteHandler.c | 9 ++++-
src/backend/utils/adt/ri_triggers.c | 2 +
src/backend/utils/adt/ruleutils.c | 7 +++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_class.h | 17 ++++----
src/include/nodes/parsenodes.h | 7 ++-
19 files changed, 85 insertions(+), 74 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Itagaki Takahiro 2011-02-23 00:58:26 pgsql: Make the second words lowercase in psql's \d titles for unlogged
Previous Message Peter Eisentraut 2011-02-22 21:45:42 pgsql: Add PL/Python functions for quoting strings