forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdbca84f
committed
In rebuild_relation(), don't access an already-closed relcache entry.
This reliably fails with -DRELCACHE_FORCE_RELEASE, as reported byAndrew Dunstan, and could sometimes fail in normal operation, resultingin a wrong persistence value being used for the transient table.It's not immediately clear to me what effects that might have beyondthe risk of a crash while accessing OldHeap->rd_rel->relpersistence,but it's probably not good.Bug introduced by commitf41872d, and made substantially worse bycommit85b506b, which added a second such access significantlylater than the heap_close. I doubt the first reference could failin a production scenario, but the second one definitely could.Discussion:https://postgr.es/m/7b52f900-0579-cda9-ae2e-de5da17090e6@2ndQuadrant.com1 parentd77ff69 commitdbca84f
1 file changed
+5
-3
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
557 | 557 |
| |
558 | 558 |
| |
559 | 559 |
| |
| 560 | + | |
560 | 561 |
| |
561 | 562 |
| |
562 | 563 |
| |
| |||
566 | 567 |
| |
567 | 568 |
| |
568 | 569 |
| |
569 |
| - | |
| 570 | + | |
| 571 | + | |
570 | 572 |
| |
571 | 573 |
| |
572 | 574 |
| |
573 | 575 |
| |
574 | 576 |
| |
575 | 577 |
| |
576 | 578 |
| |
577 |
| - | |
| 579 | + | |
578 | 580 |
| |
579 | 581 |
| |
580 | 582 |
| |
| |||
588 | 590 |
| |
589 | 591 |
| |
590 | 592 |
| |
591 |
| - | |
| 593 | + | |
592 | 594 |
| |
593 | 595 |
| |
594 | 596 |
| |
|
0 commit comments
Comments
(0)