pgsql: Reduce unnecessary list construction inRelationBuildPartitionDe
В списке pgsql-committers по дате отправления:
| От | Robert Haas |
|---|---|
| Тема | pgsql: Reduce unnecessary list construction inRelationBuildPartitionDe |
| Дата | |
| Msg-id | E1gOn6x-0000F5-E4@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Reduce unnecessary list construction in RelationBuildPartitionDesc. The 'partoids' list which was constructed by the previous version of this code was necessarily identical to 'inhoids'. There's no point to duplicating the list, so avoid that. Instead, construct the array representation directly from the original 'inhoids' list. Also, use an array rather than a list for 'boundspecs'. We know exactly how many items we need to store, so there's really no reason to use a list. Using an array instead reduces the number of memory allocations we perform. Patch by me, reviewed by Michael Paquier and Amit Langote, the latter of whom also helped with rebasing. Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7ee5f88e650619ee619f7e2854ac50ff59d0b0c7 Modified Files -------------- src/backend/partitioning/partbounds.c | 66 +++++++++++++++-------------------- src/backend/utils/cache/partcache.c | 40 ++++++++++++--------- src/include/partitioning/partbounds.h | 5 ++- 3 files changed, 53 insertions(+), 58 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера