- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitf3ff7bf
committed
Add XLogCtl->logInsertResult
This tracks the position of WAL that's been fully copied into WALbuffers by all processes emitting WAL. (For some reason we call that"WAL insertion"). This is updated using atomic monotonic advance duringWaitXLogInsertionsToFinish, which is not when the insertions actuallyoccur, but it's the only place where we know where have all theinsertions have completed.This value is useful in WALReadFromBuffers, which can verify thatcallers don't try to read past what has been inserted. (However, moreinfrastructure is needed in order to actually use WAL after the flushpoint, since it could be lost.)The value is also useful in WaitXLogInsertionsToFinish() itself, sincewe can now exit quickly when all WAL has been already inserted, withouteven having to take any locks.1 parent29f6a95 commitf3ff7bf
2 files changed
+75
-1
lines changedLines changed: 39 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
469 | 469 |
| |
470 | 470 |
| |
471 | 471 |
| |
| 472 | + | |
472 | 473 |
| |
473 | 474 |
| |
474 | 475 |
| |
| |||
1499 | 1500 |
| |
1500 | 1501 |
| |
1501 | 1502 |
| |
| 1503 | + | |
1502 | 1504 |
| |
1503 | 1505 |
| |
1504 | 1506 |
| |
| |||
1507 | 1509 |
| |
1508 | 1510 |
| |
1509 | 1511 |
| |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
1510 | 1520 |
| |
1511 | 1521 |
| |
1512 | 1522 |
| |
| |||
1586 | 1596 |
| |
1587 | 1597 |
| |
1588 | 1598 |
| |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
1589 | 1608 |
| |
1590 | 1609 |
| |
1591 | 1610 |
| |
| |||
1727 | 1746 |
| |
1728 | 1747 |
| |
1729 | 1748 |
| |
| 1749 | + | |
1730 | 1750 |
| |
1731 | 1751 |
| |
1732 | 1752 |
| |
1733 | 1753 |
| |
1734 | 1754 |
| |
1735 | 1755 |
| |
1736 |
| - | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
1737 | 1767 |
| |
1738 | 1768 |
| |
1739 | 1769 |
| |
| |||
2571 | 2601 |
| |
2572 | 2602 |
| |
2573 | 2603 |
| |
| 2604 | + | |
2574 | 2605 |
| |
2575 | 2606 |
| |
2576 | 2607 |
| |
2577 | 2608 |
| |
| 2609 | + | |
| 2610 | + | |
2578 | 2611 |
| |
2579 | 2612 |
| |
2580 | 2613 |
| |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
2581 | 2617 |
| |
2582 | 2618 |
| |
2583 | 2619 |
| |
| |||
4951 | 4987 |
| |
4952 | 4988 |
| |
4953 | 4989 |
| |
| 4990 | + | |
4954 | 4991 |
| |
4955 | 4992 |
| |
4956 | 4993 |
| |
| |||
5979 | 6016 |
| |
5980 | 6017 |
| |
5981 | 6018 |
| |
| 6019 | + | |
5982 | 6020 |
| |
5983 | 6021 |
| |
5984 | 6022 |
| |
|
Lines changed: 36 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
570 | 570 |
| |
571 | 571 |
| |
572 | 572 |
| |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
573 | 609 |
| |
574 | 610 |
| |
575 | 611 |
|
0 commit comments
Comments
(0)