Commit 8e2e266
committed
Simplify call to rebuild relcache entry for indexes
RelationClearRelation(rebuild == true) calls RelationReloadIndexInfo()
for indexes. We can rely on that in RelationIdGetRelation(), instead
of calling RelationReloadIndexInfo() directly. That simplifies the
code a little.
In the passing, add a comment in RelationBuildLocalRelation()
explaining why it doesn't call RelationInitIndexAccessInfo(). It's
because at index creation, it's called before the pg_index row has
been created. That's also the reason that RelationClearRelation()
still needs a special case to go through the full-blown rebuild if the
index support information in the relcache entry hasn't been populated
yet.
Reviewed-by: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/9c9e8908-7b3e-4ce7-85a8-00c0e165a3d6%40iki.fi1 parent 3974bc3 commit 8e2e266
1 file changed
+17
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2083 | 2083 | | |
2084 | 2084 | | |
2085 | 2085 | | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
2090 | | - | |
2091 | | - | |
2092 | | - | |
2093 | | - | |
2094 | | - | |
2095 | | - | |
| 2086 | + | |
2096 | 2087 | | |
2097 | 2088 | | |
2098 | 2089 | | |
| |||
2264 | 2255 | | |
2265 | 2256 | | |
2266 | 2257 | | |
2267 | | - | |
2268 | | - | |
2269 | | - | |
2270 | | - | |
2271 | | - | |
2272 | | - | |
2273 | | - | |
2274 | | - | |
2275 | 2258 | | |
2276 | 2259 | | |
2277 | 2260 | | |
| |||
2600 | 2583 | | |
2601 | 2584 | | |
2602 | 2585 | | |
2603 | | - | |
2604 | | - | |
2605 | | - | |
2606 | | - | |
2607 | | - | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
2608 | 2595 | | |
2609 | 2596 | | |
2610 | 2597 | | |
2611 | | - | |
| 2598 | + | |
2612 | 2599 | | |
2613 | 2600 | | |
2614 | 2601 | | |
| |||
3720 | 3707 | | |
3721 | 3708 | | |
3722 | 3709 | | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
3723 | 3716 | | |
3724 | 3717 | | |
3725 | 3718 | | |
| |||
0 commit comments