forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8c61160
committed
Guard against table-AM-less relations in planner.
The executor will dump core if it's asked to execute a seqscan ona relation having no table AM, such as a view. While that shouldn'treally happen, it's possible to get there via catalog corruption,such as a missing ON SELECT rule. It seems worth installing a defenseagainst that. There are multiple plausible places for such a defense,but I picked the planner's get_relation_info().Per discussion of bug #17646 from Kui Liu. Back-patch to v12 wherethe tableam APIs were introduced; in older versions you won't get aSIGSEGV, so it seems less pressing.Discussion:https://postgr.es/m/17646-70c93cfa40365776@postgresql.org1 parent8122160 commit8c61160
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
128 | 144 | | |
129 | 145 | | |
130 | 146 | | |
| |||
0 commit comments
Comments
(0)