forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite596e07
committed
Assert that ExecOpenIndices and ExecCloseIndices are not repeated.
These functions should be called at most once per ResultRelInfo;it's wasteful to do otherwise, and certainly the pattern ofopening twice and then closing twice is a bad idea. Moreover,aminsertcleanup functions might not be prepared to be called twice,as the just-hardened code in BRIN demonstrates.This amounts to an API change, since such coding patterns weresafe even if wasteful before v17. Hence, apply to HEAD only.(Extension code violating this new rule faces some risk in v17,but we just fixed brininsertcleanup and there are probably fewother aminsertcleanup functions as yet. So the odds of breakingusable code seem higher than the odds of doing something usefulwith a back-patch.)Bug: #18815Reported-by: Sergey Belyashov <sergey.belyashov@gmail.com>Discussion:https://postgr.es/m/18815-2a0407cc7f40b327@postgresql.org1 parent9ff6867 commite596e07
1 file changed
+11
-4
lines changedLines changed: 11 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
| 184 | + | |
| 185 | + | |
| 186 | + | |
184 | 187 |
| |
185 | 188 |
| |
186 | 189 |
| |
| |||
246 | 249 |
| |
247 | 250 |
| |
248 | 251 |
| |
249 |
| - | |
250 |
| - | |
| 252 | + | |
| 253 | + | |
251 | 254 |
| |
252 | 255 |
| |
253 | 256 |
| |
254 | 257 |
| |
255 | 258 |
| |
256 | 259 |
| |
| 260 | + | |
| 261 | + | |
| 262 | + | |
257 | 263 |
| |
258 | 264 |
| |
259 | 265 |
| |
260 |
| - | |
261 |
| - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
262 | 269 |
| |
263 | 270 |
| |
264 | 271 |
| |
|
0 commit comments
Comments
(0)