forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita82ee7e
committed
Check if ii_AmCache is NULL in aminsertcleanup
Fix a bug introduced byc1ec02b. It may happen that the executoropens indexes on the result relation, but no rows end up being inserted.Then the index_insert_cleanup still gets executed, but passes down NULLto the AM callback. The AM callback may not expect this, as is the caseof brininsertcleanup, leading to a crash.Fixed by only calling the cleanup callback if (ii_AmCache != NULL). Thisway the AM can simply assume to only see a valid cache.Reported-by: Richard GuoDiscussion:https://postgr.es/m/CAMbWs4-w9qC-o9hQox9UHvdVZAYTp8OrPQOKtwbvzWaRejTT=Q@mail.gmail.com1 parent1f39535 commita82ee7e
3 files changed
+14
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
210 |
| - | |
| 210 | + | |
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
572 | 572 |
| |
573 | 573 |
| |
574 | 574 |
| |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + |
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
515 | 515 |
| |
516 | 516 |
| |
517 | 517 |
| |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + |
0 commit comments
Comments
(0)