Re: reorganizing partitioning code (was: Re: [HACKERS] path towardfaster partition pruning)
От | Amit Langote |
---|---|
Тема | Re: reorganizing partitioning code (was: Re: [HACKERS] path towardfaster partition pruning) |
Дата | |
Msg-id | 2774e870-2523-072f-a9e0-f28a00ffe2ee@lab.ntt.co.jp обсуждение исходный текст |
Ответ на | reorganizing partitioning code (was: Re: [HACKERS] path toward fasterpartition pruning) (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
Ответы |
Re: reorganizing partitioning code (was: Re: [HACKERS] path towardfaster partition pruning)
Re: reorganizing partitioning code (was: Re: [HACKERS] path towardfaster partition pruning) |
Список | pgsql-hackers |
On 2018/02/14 10:00, Amit Langote wrote: > Agree with the proposed reorganizing and adding a partcache.c, which I > tried to do in the attached patch. > > * The new src/backend/utils/cache/partcache.c contains functions that > initialize relcache's partitioning related fields. Various partition > bound comparison and search functions (and then some) that work off of the > cached information are moved. Also, since we cache partition qual, > interface functions RelationGetPartitioQual(Relation) and > get_partition_qual_relid(Oid) are moved too. > > * The new src/include/utils/partcache.h contains various struct > definitions that are moved from backend/catalog/partition.c, > include/catalog/partition.h, and include/utils/rel.h. Also, declarations > of interface functions of partcache.c. Attached updated version, where I removed #include "catalog/partition.h" from even more places and also moved map_partition_varattnos() next to map_variable_attnos() in rewriteManip.c. Now, after applying the patch - Files #including partition.h File Line 0 src/backend/catalog/heap.c 44 #include "catalog/partition.h" 1 src/backend/catalog/partition.c 22 #include "catalog/partition.h" 2 src/backend/commands/indexcmds.c 26 #include "catalog/partition.h" 3 src/backend/commands/tablecmds.c 33 #include "catalog/partition.h" 4 src/backend/utils/cache/partcache.c 23 #include "catalog/partition.h" Files #including partcache.h File Line 0 src/backend/optimizer/path/joinrels.c 24 #include "utils/partcache.h" 1 src/backend/optimizer/prep/prepunion.c 51 #include "utils/partcache.h" 2 src/backend/optimizer/util/relnode.c 30 #include "utils/partcache.h" 3 src/backend/utils/cache/partcache.c 37 #include "utils/partcache.h" 4 src/backend/utils/cache/relcache.c 83 #include "utils/partcache.h" 5 src/include/executor/execPartition.h 19 #include "utils/partcache.h" 6 src/include/utils/rel.h 27 #include "utils/partcache.h" Thanks, Amit
Вложения
В списке pgsql-hackers по дате отправления: