forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit798b4fa
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 parent71e561b commit798b4fa
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 |
| |
| |||
121 | 137 |
| |
122 | 138 |
| |
123 | 139 |
| |
124 |
| - | |
| 140 | + | |
125 | 141 |
| |
126 | 142 |
| |
127 | 143 |
| |
| |||
419 | 435 |
| |
420 | 436 |
| |
421 | 437 |
| |
422 |
| - | |
| 438 | + | |
423 | 439 |
| |
424 | 440 |
| |
425 | 441 |
| |
| |||
600 | 616 |
| |
601 | 617 |
| |
602 | 618 |
| |
603 |
| - | |
| 619 | + | |
604 | 620 |
| |
605 | 621 |
| |
606 | 622 |
| |
| |||
610 | 626 |
| |
611 | 627 |
| |
612 | 628 |
| |
613 |
| - | |
| 629 | + | |
614 | 630 |
| |
615 | 631 |
| |
616 | 632 |
| |
|
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)