- Notifications
You must be signed in to change notification settings - Fork5k
Commitd6d8054
committed
localbuf: Track pincount in BufferDesc as well
For AIO on temporary table buffers the AIO subsystem needs to be able toensure a pin on a buffer while AIO is going on, even if the IO issuing queryerrors out. Tracking the buffer in LocalRefCount does not work, as it wouldcause CheckForLocalBufferLeaks() to assert out.Instead, also track the refcount in BufferDesc.state, not justLocalRefCount. This also makes local buffers behave a bit more akin to sharedbuffers.Note that we still don't need locking, AIO completion callbacks for localbuffers are executed in the issuing session (i.e. nobody else has access tothe BufferDesc).Reviewed-by: Noah Misch <noah@leadboat.com>Discussion:https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt1 parent08ccd56 commitd6d8054
1 file changed
+26
-2
lines changedLines changed: 26 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
249 | 249 |
| |
250 | 250 |
| |
251 | 251 |
| |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
252 | 259 |
| |
253 | 260 |
| |
254 | 261 |
| |
| |||
570 | 577 |
| |
571 | 578 |
| |
572 | 579 |
| |
573 |
| - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
574 | 587 |
| |
575 | 588 |
| |
576 | 589 |
| |
| |||
744 | 757 |
| |
745 | 758 |
| |
746 | 759 |
| |
| 760 | + | |
747 | 761 |
| |
748 | 762 |
| |
749 | 763 |
| |
750 | 764 |
| |
751 |
| - | |
752 | 765 |
| |
| 766 | + | |
753 | 767 |
| |
754 | 768 |
| |
755 | 769 |
| |
| |||
775 | 789 |
| |
776 | 790 |
| |
777 | 791 |
| |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
778 | 796 |
| |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
779 | 803 |
| |
780 | 804 |
| |
781 | 805 |
| |
|
0 commit comments
Comments
(0)