pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Reorganize partitioning code
2+ messages / 2 participants
[nested] [flat]

* pgsql: Reorganize partitioning code
@ 2018-04-15 00:15  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 2+ messages in thread

From: Alvaro Herrera @ 2018-04-15 00:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Reorganize partitioning code

There's been a massive addition of partitioning code in PostgreSQL 11,
with little oversight on its placement, resulting in a
catalog/partition.c with poorly defined boundaries and responsibilities.
This commit tries to set a couple of distinct modules to separate things
a little bit.  There are no code changes here, only code movement.

There are three new files:
  src/backend/utils/cache/partcache.c
  src/include/partitioning/partdefs.h
  src/include/utils/partcache.h

The previous arrangement of #including catalog/partition.h almost
everywhere is no more.

Authors: Amit Langote and Álvaro Herrera
Discussion: https://postgr.es/m/98e8d509-790a-128c-be7f-e48a5b2d8d97@lab.ntt.co.jp
        https://postgr.es/m/11aa0c50-316b-18bb-722d-c23814f39059@lab.ntt.co.jp
        https://postgr.es/m/143ed9a4-6038-76d4-9a55-502035815e68@lab.ntt.co.jp
        https://postgr.es/m/20180413193503.nynq7bnmgh6vs5vm@alvherre.pgsql

Branch
------
master

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

Modified Files
--------------
contrib/pageinspect/hashfuncs.c                 |    1 +
contrib/pg_stat_statements/pg_stat_statements.c |    1 +
src/backend/catalog/heap.c                      |    1 +
src/backend/catalog/partition.c                 | 3360 +----------------------
src/backend/catalog/pg_constraint.c             |    2 +
src/backend/commands/indexcmds.c                |    1 +
src/backend/commands/tablecmds.c                |    2 +
src/backend/commands/trigger.c                  |    1 +
src/backend/executor/execMain.c                 |    2 +-
src/backend/executor/execPartition.c            |  113 +-
src/backend/optimizer/path/joinrels.c           |    2 +-
src/backend/optimizer/util/plancat.c            |    4 +-
src/backend/optimizer/util/relnode.c            |    2 +-
src/backend/parser/parse_utilcmd.c              |    1 +
src/backend/partitioning/Makefile               |    2 +-
src/backend/partitioning/partbounds.c           | 2315 ++++++++++++++++
src/backend/tcop/utility.c                      |    1 +
src/backend/utils/adt/ruleutils.c               |    2 +-
src/backend/utils/cache/Makefile                |    6 +-
src/backend/utils/cache/partcache.c             |  967 +++++++
src/backend/utils/cache/relcache.c              |  208 +-
src/backend/utils/misc/pg_controldata.c         |    5 +-
src/include/catalog/partition.h                 |   34 +-
src/include/commands/tablecmds.h                |    1 -
src/include/executor/execPartition.h            |    1 -
src/include/executor/executor.h                 |    1 -
src/include/nodes/parsenodes.h                  |    6 +-
src/include/partitioning/partbounds.h           |   41 +-
src/include/partitioning/partdefs.h             |   24 +
src/include/partitioning/partprune.h            |    3 +-
src/include/utils/partcache.h                   |   96 +
src/include/utils/rel.h                         |   72 -
32 files changed, 3693 insertions(+), 3585 deletions(-)



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

* Re: pgsql: Reorganize partitioning code
@ 2018-04-15 03:00  Amit Langote <amitlangote09@gmail.com>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Langote @ 2018-04-15 03:00 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org

Thanks for the commit...

On Sun, Apr 15, 2018 at 9:15 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> Reorganize partitioning code
>
> There's been a massive addition of partitioning code in PostgreSQL 11,
> with little oversight on its placement, resulting in a
> catalog/partition.c with poorly defined boundaries and responsibilities.
> This commit tries to set a couple of distinct modules to separate things
> a little bit.  There are no code changes here, only code movement.
>
> There are three new files:
>   src/backend/utils/cache/partcache.c
>   src/include/partitioning/partdefs.h
>   src/include/utils/partcache.h

And:

> src/backend/partitioning/partbounds.c           | 2315 ++++++++++++++++

Thanks,
Amit




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


end of thread, other threads:[~2018-04-15 03:00 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-15 00:15 pgsql: Reorganize partitioning code Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-04-15 03:00 ` Amit Langote <amitlangote09@gmail.com>

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