- Notifications
You must be signed in to change notification settings - Fork5
Commit9513918
committed
Fix up flushing of composite-type typcache entries to be driven directly by
SI invalidation events, rather than indirectly through the relcache.In the previous coding, we had to flush a composite-type typcache entrywhenever we discarded the corresponding relcache entry. This caused problemsat least when testing with RELCACHE_FORCE_RELEASE, as shown in recent reportfrom Jeff Davis, and might result in real-world problems given the kind ofunexpected relcache flush that that test mechanism is intended to model.The new coding decouples relcache and typcache management, which is a goodthing anyway from a structural perspective. The cost is that we have tosearch the typcache linearly to find entries that need to be flushed. Thereare a couple of ways we could avoid that, but at the moment it's not clearit's worth any extra trouble, because the typcache contains very few entriesin typical operation.Back-patch to 8.2, the same as some other recent fixes in this general area.The patch could be carried back to 8.0 with some additional work, but giventhat it's only hypothetical whether we're fixing any problem observable inthe field, it doesn't seem worth the work now.1 parentf3c903f commit9513918
File tree
3 files changed
+53
-43
lines changed- src
- backend/utils/cache
- include/utils
3 files changed
+53
-43
lines changedLines changed: 1 addition & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
80 |
| - | |
81 | 80 |
| |
82 | 81 |
| |
83 | 82 |
| |
| |||
1854 | 1853 |
| |
1855 | 1854 |
| |
1856 | 1855 |
| |
1857 |
| - | |
1858 |
| - | |
1859 | 1856 |
| |
1860 | 1857 |
| |
1861 | 1858 |
| |
| |||
1925 | 1922 |
| |
1926 | 1923 |
| |
1927 | 1924 |
| |
1928 |
| - | |
1929 |
| - | |
1930 |
| - | |
1931 | 1925 |
| |
1932 | 1926 |
| |
1933 | 1927 |
| |
| |||
1975 | 1969 |
| |
1976 | 1970 |
| |
1977 | 1971 |
| |
1978 |
| - | |
1979 | 1972 |
| |
1980 | 1973 |
| |
1981 | 1974 |
| |
1982 | 1975 |
| |
1983 | 1976 |
| |
1984 | 1977 |
| |
1985 | 1978 |
| |
1986 |
| - | |
1987 |
| - | |
1988 | 1979 |
| |
1989 | 1980 |
| |
1990 | 1981 |
| |
|
Lines changed: 51 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
8 |
| - | |
| 7 | + | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
| 39 | + | |
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| 51 | + | |
51 | 52 |
| |
52 | 53 |
| |
53 | 54 |
| |
| |||
86 | 87 |
| |
87 | 88 |
| |
88 | 89 |
| |
| 90 | + | |
| 91 | + | |
89 | 92 |
| |
90 | 93 |
| |
91 | 94 |
| |
| |||
116 | 119 |
| |
117 | 120 |
| |
118 | 121 |
| |
| 122 | + | |
| 123 | + | |
| 124 | + | |
119 | 125 |
| |
120 | 126 |
| |
121 | 127 |
| |
| |||
497 | 503 |
| |
498 | 504 |
| |
499 | 505 |
| |
500 |
| - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
501 | 511 |
| |
502 |
| - | |
503 |
| - | |
504 |
| - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
505 | 525 |
| |
506 |
| - | |
507 |
| - | |
| 526 | + | |
| 527 | + | |
508 | 528 |
| |
| 529 | + | |
509 | 530 |
| |
510 | 531 |
| |
511 |
| - | |
512 |
| - | |
513 |
| - | |
514 |
| - | |
515 |
| - | |
516 |
| - | |
517 |
| - | |
518 |
| - | |
519 |
| - | |
520 |
| - | |
521 |
| - | |
522 |
| - | |
523 |
| - | |
524 |
| - | |
525 |
| - | |
526 |
| - | |
527 |
| - | |
528 |
| - | |
529 |
| - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
530 | 538 |
| |
531 |
| - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
532 | 553 |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
89 |
| - | |
90 |
| - | |
91 | 89 |
|
0 commit comments
Comments
(0)