- Notifications
You must be signed in to change notification settings - Fork28
Commit6448704
committed
Fix assorted syscache lookup sloppiness in partition-related code.
heap_drop_with_catalog and ATExecDetachPartition neglected to check forSearchSysCache failures, as noted in bugs #14927 and #14928 from Pan Bian.Such failures are pretty unlikely, since we should already have some sortof lock on the rel at these points, but it's neither a good idea norper project style to omit a check for failure.Also, StorePartitionKey contained a syscache lookup that it never didanything with, including never releasing the result. Presumably thereason why we don't see refcount-leak complaints is that the lookupalways fails; but in any case it's pretty useless, so remove it.All of these errors were evidently introduced by the relationpartitioning feature. Back-patch to v10 where that came in.Amit Langote and Tom LaneDiscussion:https://postgr.es/m/20171127090105.1463.3962@wrigleys.postgresql.orgDiscussion:https://postgr.es/m/20171127091341.1468.72696@wrigleys.postgresql.org1 parenta57aa43 commit6448704
2 files changed
+5
-3
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1769 | 1769 |
| |
1770 | 1770 |
| |
1771 | 1771 |
| |
| 1772 | + | |
| 1773 | + | |
1772 | 1774 |
| |
1773 | 1775 |
| |
1774 | 1776 |
| |
| |||
3105 | 3107 |
| |
3106 | 3108 |
| |
3107 | 3109 |
| |
3108 |
| - | |
3109 |
| - | |
3110 |
| - | |
3111 | 3110 |
| |
3112 | 3111 |
| |
3113 | 3112 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13815 | 13815 |
| |
13816 | 13816 |
| |
13817 | 13817 |
| |
| 13818 | + | |
| 13819 | + | |
| 13820 | + | |
13818 | 13821 |
| |
13819 | 13822 |
| |
13820 | 13823 |
| |
|
0 commit comments
Comments
(0)