forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbca409e
committed
Assert that we don't insert nulls into attnotnull catalog columns.
The executor checks for this error, and so does the bootstrap catalogloader, but we never checked for it in retail catalog manipulations.The folly of that has now been exposed, so let's add assertionschecking it. Checking in CatalogTupleInsert[WithInfo] andCatalogTupleUpdate[WithInfo] should be enough to cover this.Back-patch to v10; the aforesaid functions didn't exist before that,and it didn't seem worth adapting the patch to the oldest branches.But given the risk of JIT crashes, I think we certainly need thisas far back as v11.Pre-v13, we have to explicitly exclude pg_subscription.subslotnameand pg_subscription_rel.srsublsn from the checks, since they aremismarked. (Even if we change our mind about applying BKI_FORCE_NULLin the branch tips, it doesn't seem wise to have assertions thatwould fire in existing databases.)Discussion:https://postgr.es/m/298837.1595196283@sss.pgh.pa.us1 parente5372b4 commitbca409e
2 files changed
+46
-4
lines changedLines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
| 125 | + | |
129 | 126 |
| |
130 | 127 |
| |
131 | 128 |
| |
|
Lines changed: 45 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
170 | 207 |
| |
171 | 208 |
| |
172 | 209 |
| |
| |||
184 | 221 |
| |
185 | 222 |
| |
186 | 223 |
| |
| 224 | + | |
| 225 | + | |
187 | 226 |
| |
188 | 227 |
| |
189 | 228 |
| |
| |||
204 | 243 |
| |
205 | 244 |
| |
206 | 245 |
| |
| 246 | + | |
| 247 | + | |
207 | 248 |
| |
208 | 249 |
| |
209 | 250 |
| |
| |||
225 | 266 |
| |
226 | 267 |
| |
227 | 268 |
| |
| 269 | + | |
| 270 | + | |
228 | 271 |
| |
229 | 272 |
| |
230 | 273 |
| |
| |||
245 | 288 |
| |
246 | 289 |
| |
247 | 290 |
| |
| 291 | + | |
| 292 | + | |
248 | 293 |
| |
249 | 294 |
| |
250 | 295 |
| |
|
0 commit comments
Comments
(0)