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

Amit Kapila
Log the conflicts while applying changes in logical replication.
This patch provides the additional logging information in the followingconflict scenarios while applying changes:insert_exists: Inserting a row that violates a NOT DEFERRABLE unique constraint.update_differ: Updating a row that was previously modified by another origin.update_exists: The updated row value violates a NOT DEFERRABLE unique constraint.update_missing: The tuple to be updated is missing.delete_differ: Deleting a row that was previously modified by another origin.delete_missing: The tuple to be deleted is missing.For insert_exists and update_exists conflicts, the log can include the originand commit timestamp details of the conflicting key with track_commit_timestampenabled.update_differ and delete_differ conflicts can only be detected whentrack_commit_timestamp is enabled on the subscriber.We do not offer additional logging for exclusion constraint violations becausethese constraints can specify rules that are more complex than simple equalitychecks. Resolving such conflicts won't be straightforward. This area can befurther enhanced if required.Author: Hou ZhijieReviewed-by: Shveta Malik, Amit Kapila, Nisha Moond, Hayato Kuroda, Dilip KumarDiscussion:https://postgr.es/m/OS0PR01MB5716352552DFADB8E9AD1D8994C92@OS0PR01MB5716.jpnprd01.prod.outlook.com1 parentadf97c1 commit9758174
File tree
18 files changed
+1033
-143
lines changed- doc/src/sgml
- src
- backend
- access/index
- catalog
- executor
- replication/logical
- include
- executor
- replication
- test/subscription/t
- tools/pgindent
18 files changed
+1033
-143
lines changedLines changed: 98 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1579 | 1579 |
| |
1580 | 1580 |
| |
1581 | 1581 |
| |
1582 |
| - | |
1583 |
| - | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 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 | + | |
1584 | 1667 |
| |
1585 | 1668 |
| |
1586 | 1669 |
| |
| |||
1597 | 1680 |
| |
1598 | 1681 |
| |
1599 | 1682 |
| |
1600 |
| - | |
| 1683 | + | |
1601 | 1684 |
| |
1602 | 1685 |
| |
1603 | 1686 |
| |
| |||
1609 | 1692 |
| |
1610 | 1693 |
| |
1611 | 1694 |
| |
1612 |
| - | |
1613 |
| - | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
1614 | 1698 |
| |
1615 | 1699 |
| |
1616 | 1700 |
| |
| |||
1636 | 1720 |
| |
1637 | 1721 |
| |
1638 | 1722 |
| |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1639 | 1732 |
| |
1640 | 1733 |
| |
1641 | 1734 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
157 |
| - | |
158 |
| - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
159 | 160 |
| |
160 | 161 |
| |
161 | 162 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2631 | 2631 |
| |
2632 | 2632 |
| |
2633 | 2633 |
| |
2634 |
| - | |
2635 |
| - | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
2636 | 2637 |
| |
2637 | 2638 |
| |
2638 | 2639 |
| |
|
Lines changed: 11 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
210 |
| - | |
211 |
| - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
212 | 213 |
| |
213 | 214 |
| |
214 | 215 |
| |
| |||
519 | 520 |
| |
520 | 521 |
| |
521 | 522 |
| |
522 |
| - | |
523 |
| - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
524 | 529 |
| |
525 | 530 |
| |
526 | 531 |
| |
527 | 532 |
| |
528 | 533 |
| |
529 |
| - | |
| 534 | + | |
530 | 535 |
| |
531 | 536 |
| |
532 | 537 |
| |
| |||
629 | 634 |
| |
630 | 635 |
| |
631 | 636 |
| |
632 |
| - | |
| 637 | + | |
633 | 638 |
| |
634 | 639 |
| |
635 | 640 |
| |
|
Lines changed: 1 addition & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 | 91 |
| |
97 | 92 |
| |
98 | 93 |
| |
| |||
2210 | 2205 |
| |
2211 | 2206 |
| |
2212 | 2207 |
| |
2213 |
| - | |
| 2208 | + | |
2214 | 2209 |
| |
2215 | 2210 |
| |
2216 | 2211 |
| |
|
0 commit comments
Comments
(0)