pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove some unnecessary fields from Plan trees.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Remove some unnecessary fields from Plan trees.
@ 2018-10-07 18:33 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-10-07 18:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove some unnecessary fields from Plan trees.

In the wake of commit f2343653f, we no longer need some fields that
were used before to control executor lock acquisitions:

* PlannedStmt.nonleafResultRelations can go away entirely.

* partitioned_rels can go away from Append, MergeAppend, and ModifyTable.
However, ModifyTable still needs to know the RT index of the partition
root table if any, which was formerly kept in the first entry of that
list.  Add a new field "rootRelation" to remember that.  rootRelation is
partly redundant with nominalRelation, in that if it's set it will have
the same value as nominalRelation.  However, the latter field has a
different purpose so it seems best to keep them distinct.

Amit Langote, reviewed by David Rowley and Jesper Pedersen,
and whacked around a bit more by me

Discussion: https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/52ed730d511b7b1147f2851a7295ef1fb5273776

Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c     |  2 +-
src/backend/executor/execParallel.c     |  1 -
src/backend/executor/execPartition.c    |  2 +-
src/backend/nodes/copyfuncs.c           |  5 +--
src/backend/nodes/outfuncs.c            |  8 +---
src/backend/nodes/readfuncs.c           |  5 +--
src/backend/optimizer/plan/createplan.c | 42 +++---------------
src/backend/optimizer/plan/planner.c    | 78 +++++++++++----------------------
src/backend/optimizer/plan/setrefs.c    | 31 +++----------
src/backend/optimizer/util/pathnode.c   |  8 ++--
src/include/nodes/plannodes.h           | 27 +++++-------
src/include/nodes/relation.h            |  4 +-
src/include/optimizer/pathnode.h        |  2 +-
13 files changed, 61 insertions(+), 154 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Remove some unnecessary fields from executor nodes.
@ 2024-04-23 16:55 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2024-04-23 16:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove some unnecessary fields from executor nodes.

JsonExprState.input_finfo is only assigned to, never read, and
it's really fairly useless since the value can be gotten out of
the adjacent input_fcinfo field.  Let's remove it before someone
starts to depend on it.

While here, also remove TidScanState.tss_htup and AggState.combinedproj,
which are referenced nowhere.  Those should have been removed by the
commits that caused them to become disused, but were not.

I don't think a catversion bump is necessary here, since plan trees
are never stored on disk.

Matthias van de Meent

Discussion: https://postgr.es/m/CAEze2WjsY4d0TBymLNGK4zpttUcg_YZaTjyWz2VfDUV6YH8wXQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b7d35d393edbe2d4333dde81496e8a362abc85bd

Modified Files
--------------
src/backend/executor/execExpr.c | 1 -
src/include/nodes/execnodes.h   | 4 ----
2 files changed, 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-04-23 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07 18:33 pgsql: Remove some unnecessary fields from Plan trees. Tom Lane <tgl@sss.pgh.pa.us>
2024-04-23 16:55 pgsql: Remove some unnecessary fields from executor nodes. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox