Commit c8151e6
committed
Don't copy PartitionBoundInfo in set_relation_partition_info.
I (tgl) remain dubious that it's a good idea for PartitionDirectory
to hold a pin on a relcache entry throughout planning, rather than
copying the data or using some kind of refcount scheme. However, it's
certainly the responsibility of the PartitionDirectory code to ensure
that what it's handing back is a stable data structure, not that of
its caller. So this is a pretty clear oversight in commit 898e5e3,
and one that can cost a lot of performance when there are many
partitions.
Amit Langote (extracted from a much larger patch set)
Discussion: https://postgr.es/m/CA+TgmoY3bRmGB6-DUnoVy5fJoreiBJ43rwMrQRCdPXuKt4Ykaw@mail.gmail.com
Discussion: https://postgr.es/m/9d7c5112-cb99-6a47-d3be-cf1ee6862a1d@lab.ntt.co.jp1 parent b5fd497 commit c8151e6
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
2082 | 2081 | | |
2083 | 2082 | | |
2084 | 2083 | | |
2085 | | - | |
2086 | 2084 | | |
2087 | 2085 | | |
2088 | 2086 | | |
2089 | 2087 | | |
2090 | 2088 | | |
2091 | | - | |
2092 | 2089 | | |
2093 | 2090 | | |
2094 | | - | |
| 2091 | + | |
2095 | 2092 | | |
2096 | 2093 | | |
2097 | 2094 | | |
| |||
0 commit comments