forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit855195a
committed
Kluge slot_compile_deform() to ignore incorrect attnotnull markings.
Since we mustn't force an initdb in released branches, there is nosimple way to correct the markings of pg_subscription.subslotnameand pg_subscription_rel.srsublsn as attnotnull in existing pre-v13installations.Fortunately, released branches don't rely on attnotnull being correctfor much. The planner looks at it in relation_excluded_by_constraints,but it'd be difficult to get that to matter for a query on a systemcatalog. The only place where it's really problematic is in JIT'sslot_compile_deform(), which can produce incorrect code that crashesif there are NULLs in an allegedly not-null column.Hence, hack up slot_compile_deform() to be specifically aware ofthese two incorrect markings and not trust them.This applies to v11 and v12; the JIT code didn't exist before that,and we've fixed the markings in v13.Discussion:https://postgr.es/m/229396.1595191345@sss.pgh.pa.us1 parente8de627 commit855195a
File tree
3 files changed
+29
-4
lines changed- src
- backend/jit/llvm
- test/regress
- expected
- sql
3 files changed
+29
-4
lines changedLines changed: 20 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
25 | 27 |
| |
26 | 28 |
| |
27 | 29 |
| |
28 | 30 |
| |
29 | 31 |
| |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 |
| |
31 | 47 |
| |
32 | 48 |
| |
| |||
113 | 129 |
| |
114 | 130 |
| |
115 | 131 |
| |
116 |
| - | |
| 132 | + | |
117 | 133 |
| |
118 | 134 |
| |
119 | 135 |
| |
| |||
376 | 392 |
| |
377 | 393 |
| |
378 | 394 |
| |
379 |
| - | |
| 395 | + | |
380 | 396 |
| |
381 | 397 |
| |
382 | 398 |
| |
| |||
557 | 573 |
| |
558 | 574 |
| |
559 | 575 |
| |
560 |
| - | |
| 576 | + | |
561 | 577 |
| |
562 | 578 |
| |
563 | 579 |
| |
| |||
567 | 583 |
| |
568 | 584 |
| |
569 | 585 |
| |
570 |
| - | |
| 586 | + | |
571 | 587 |
| |
572 | 588 |
| |
573 | 589 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
150 | 157 |
| |
151 | 158 |
| |
152 | 159 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| 112 | + | |
| 113 | + | |
112 | 114 |
| |
113 | 115 |
| |
114 | 116 |
| |
|
0 commit comments
Comments
(0)