forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit02c1b64

Amit Kapila
Refactor to split Apply and Tablesync Workers code.
Both apply and tablesync workers were using ApplyWorkerMain() as entrypoint. As the name implies, ApplyWorkerMain() should be considered asthe main function for apply workers. Tablesync worker's path was hiddenand does not have enough in common to share the same main function withapply worker.Also, most of the code shared by both worker types is already combinedin LogicalRepApplyLoop(). There is no need to combine the rest inApplyWorkerMain() anymore.This patch introduces TablesyncWorkerMain() as a new entry point fortablesync workers. This aims to increase code readability and would helpwith future improvements like the reuse of tablesync workers in theinitial synchronization.Author: Melih Mutlu based on suggestions by Melanie PlagemanReviewed-by: Peter Smith, Kuroda Hayato, Amit KapilaDiscussion:http://postgr.es/m/CAGPVpCTq=rUDd4JUdaRc1XUWf4BrH2gdSNf3rtOMUGj9rPpfzQ@mail.gmail.com1 parent0125c4e commit02c1b64
File tree
7 files changed
+299
-224
lines changed- src
- backend
- postmaster
- replication/logical
- include/replication
7 files changed
+299
-224
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| 134 | + | |
| 135 | + | |
| 136 | + | |
134 | 137 |
| |
135 | 138 |
| |
136 | 139 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
942 | 942 |
| |
943 | 943 |
| |
944 | 944 |
| |
945 |
| - | |
| 945 | + | |
946 | 946 |
| |
947 | 947 |
| |
948 | 948 |
| |
|
Lines changed: 19 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
| 462 | + | |
462 | 463 |
| |
463 |
| - | |
464 |
| - | |
465 |
| - | |
466 |
| - | |
467 | 464 |
| |
468 |
| - | |
469 |
| - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
470 | 472 |
| |
471 |
| - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
472 | 478 |
| |
| 479 | + | |
| 480 | + | |
473 | 481 |
| |
474 |
| - | |
475 |
| - | |
476 |
| - | |
477 |
| - | |
478 |
| - | |
479 |
| - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
480 | 486 |
| |
481 | 487 |
| |
482 | 488 |
| |
|
Lines changed: 90 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
| 109 | + | |
109 | 110 |
| |
110 | 111 |
| |
111 | 112 |
| |
| |||
1241 | 1242 |
| |
1242 | 1243 |
| |
1243 | 1244 |
| |
1244 |
| - | |
| 1245 | + | |
1245 | 1246 |
| |
1246 | 1247 |
| |
1247 | 1248 |
| |
| |||
1584 | 1585 |
| |
1585 | 1586 |
| |
1586 | 1587 |
| |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
1587 | 1676 |
| |
1588 | 1677 |
| |
1589 | 1678 |
| |
|
0 commit comments
Comments
(0)