- Notifications
You must be signed in to change notification settings - Fork5
Commit8de3e41
committed
In RelationClearRelation, postpone cache reload if !IsTransactionState().
We may process relcache flush requests during transaction startup orshutdown. In general it's not terribly safe to do catalog access at thosetimes, so the code's habit of trying to immediately revalidate unflushablerelcache entries is risky. Although there are no field trouble reportsthat are positively traceable to this, we have been able to demonstratefailure of the assertions recently added in RelationIdGetRelation() andSearchCatCache(). On the other hand, it seems safe to just postponerevalidation of the cache entry until we're inside a valid transaction.The one case where this is questionable is where we're exiting asubtransaction and the outer transaction is holding the relcache entry open--- but if we made any significant changes to the rel inside such asubtransaction, we've got problems anyway. There are mechanisms in placeto prevent that (to wit, locks for cross-session cases andCheckTableNotInUse() for intra-session cases), so let's trust to thosemechanisms to keep us out of trouble.1 parent45e1b6c commit8de3e41
File tree
3 files changed
+69
-10
lines changed- src
- backend/utils/cache
- test/regress
- expected
- sql
3 files changed
+69
-10
lines changedLines changed: 36 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1601 | 1601 |
| |
1602 | 1602 |
| |
1603 | 1603 |
| |
| 1604 | + | |
1604 | 1605 |
| |
1605 | 1606 |
| |
1606 | 1607 |
| |
| |||
1712 | 1713 |
| |
1713 | 1714 |
| |
1714 | 1715 |
| |
1715 |
| - | |
1716 |
| - | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
1717 | 1719 |
| |
1718 | 1720 |
| |
1719 | 1721 |
| |
| |||
1892 | 1894 |
| |
1893 | 1895 |
| |
1894 | 1896 |
| |
1895 |
| - | |
1896 |
| - | |
1897 |
| - | |
1898 |
| - | |
1899 |
| - | |
1900 |
| - | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1901 | 1902 |
| |
1902 | 1903 |
| |
1903 | 1904 |
| |
| |||
1906 | 1907 |
| |
1907 | 1908 |
| |
1908 | 1909 |
| |
1909 |
| - | |
| 1910 | + | |
1910 | 1911 |
| |
1911 | 1912 |
| |
1912 | 1913 |
| |
| |||
1924 | 1925 |
| |
1925 | 1926 |
| |
1926 | 1927 |
| |
1927 |
| - | |
| 1928 | + | |
| 1929 | + | |
1928 | 1930 |
| |
1929 | 1931 |
| |
1930 | 1932 |
| |
| |||
1945 | 1947 |
| |
1946 | 1948 |
| |
1947 | 1949 |
| |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
1948 | 1973 |
| |
1949 | 1974 |
| |
1950 | 1975 |
| |
| |||
2057 | 2082 |
| |
2058 | 2083 |
| |
2059 | 2084 |
| |
| 2085 | + | |
2060 | 2086 |
| |
2061 | 2087 |
| |
2062 | 2088 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
552 | 552 |
| |
553 | 553 |
| |
554 | 554 |
| |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
555 | 569 |
| |
556 | 570 |
| |
557 | 571 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
333 | 333 |
| |
334 | 334 |
| |
335 | 335 |
| |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
336 | 355 |
| |
337 | 356 |
| |
338 | 357 |
| |
|
0 commit comments
Comments
(0)