postgresql/src/backend
David Rowley 94cad7a3e6 Optimize generate_orderedappend_paths
In generate_orderedappend_paths(), when match_partition_order_desc was
true, we would lcons() items to various lists in a loop over each live
partition.  When the number of live partitions was large, the lcons()
could show up in profiles due to it having to perform memmove() to make
way for the new list item.

Here we adjust things so that we just perform the loop over the live
partitions backwards when match_partition_order_desc is true.  This allows
us to simplify the logic in the loop.  Now, as far as the guts of the loop
knows, there's no difference between match_partition_order and
match_partition_order_desc.  We can just set match_partition_order to true
so that we build the correct list of paths for the asc and desc case. Per
idea from Andres Freund.

Discussion: https://postgr.es/m/20230217002351.nyt4y5tdzg6hugdt@awork3.anarazel.de
2023-02-20 22:48:58 +13:00
..
access Fix handling of multi-column BRIN indexes 2023-02-19 01:46:58 +01:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Improve TimestampDifferenceMilliseconds to cope with overflow sanely. 2023-01-26 17:09:12 -05:00
bootstrap Update copyright for 2023 2023-01-02 15:00:37 -05:00
catalog Fix object identity string for transforms 2023-02-13 14:03:09 +01:00
commands Fix check for child column generation status matching parent. 2023-02-16 18:51:55 -05:00
executor Remove duplicated comment in nodeModifyTable.c 2023-02-16 17:13:26 +09:00
foreign Update copyright for 2023 2023-01-02 15:00:37 -05:00
jit Fix various typos in code and tests 2023-02-09 14:43:53 +09:00
lib Fix ILIST_DEBUG build 2023-01-18 10:26:15 -08:00
libpq Add description for new patterns supported in HBA and ident sample files 2023-02-16 07:38:52 +09:00
main Update copyright for 2023 2023-01-02 15:00:37 -05:00
nodes Mark more nodes with attribute no_query_jumble 2023-02-13 09:07:33 +09:00
optimizer Optimize generate_orderedappend_paths 2023-02-20 22:48:58 +13:00
parser Fix incorrect format placeholder 2023-02-10 12:00:51 +01:00
partitioning Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
po Update copyright for 2023 2023-01-02 15:00:37 -05:00
port Update copyright for 2023 2023-01-02 15:00:37 -05:00
postmaster Redesign archive modules 2023-02-17 14:26:42 +09:00
regex Update copyright for 2023 2023-01-02 15:00:37 -05:00
replication Speedup and increase usability of set proc title functions 2023-02-20 16:18:27 +13:00
rewrite Make Vars be outer-join-aware. 2023-01-30 13:16:20 -05:00
snowball Update copyright for 2023 2023-01-02 15:00:37 -05:00
statistics Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
storage Speedup and increase usability of set proc title functions 2023-02-20 16:18:27 +13:00
tcop Speedup and increase usability of set proc title functions 2023-02-20 16:18:27 +13:00
tsearch Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
utils Add MSVC support for pg_leftmost_one_pos32() and friends 2023-02-20 14:55:32 +07:00
.gitignore
Makefile Redesign archive modules 2023-02-17 14:26:42 +09:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
meson.build Redesign archive modules 2023-02-17 14:26:42 +09:00
nls.mk NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00