forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit957ba9f
committed
Detect version mismatch in brin_page_items
Commitdae761a modified brin_page_items() to return the new "empty"flag for each BRIN range. But the new output parameter was added in themiddle, which may cause crashes when using the new binary with oldfunction definition.The ideal solution would be to introduce API versioning similar to whatpg_stat_statements does, but it's too late for that as PG17 was alreadyreleased (so we can't introduce a new extension version). We could dosomething similar in brin_page_items() by checking the number of outputcolumns (and ignoring the new flag), but it doesn't seem very nice.Instead, simply error out and suggest updating the extension to thelatest version. pageinspect is a superuser-only extension, and there'snot much reason to run an older version. Moreover, there's a precedentfor this approach in691e8b2.Reported by Ľuboslav Špilák, investigation and patch by me. Backpatch to17, same asdae761a.Reported-by: Ľuboslav ŠpilákReviewed-by: Michael Paquier, Hayato Kuroda, Peter GeogheganBackpatch-through: 17Discussion:https://postgr.es/m/VI1PR02MB63331C3D90E2104FD12399D38A5D2@VI1PR02MB6333.eurprd02.prod.outlook.comDiscussion:https://postgr.es/m/flat/3385a58f-5484-49d0-b790-9a198a0bf236@vondra.me1 parent8cd44db commit957ba9f
File tree
3 files changed
+40
-0
lines changed- contrib/pageinspect
- expected
- sql
3 files changed
+40
-0
lines changedLines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
| 120 | + | |
| 121 | + | |
120 | 122 |
| |
121 | 123 |
| |
122 | 124 |
| |
| |||
145 | 147 |
| |
146 | 148 |
| |
147 | 149 |
| |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
148 | 165 |
| |
149 | 166 |
| |
150 | 167 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
55 | 69 |
| |
56 | 70 |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
25 | 34 |
| |
26 | 35 |
|
0 commit comments
Comments
(0)