forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit07082b0
committed
Fix bogus completion tag usage in walsender
Since commitfd5942c (2012, 9.3-era), walsender has been sendingcompletion tags for certain replication commands twice -- and they'renot even consistent. Apparently neither libpq nor JDBC have a problemwith it, but it's not kosher. Fix by remove the EndCommand() call inthe common code path for them all, and inserting specific calls toEndReplicationCommand() specifically in those places where it's needed.EndReplicationCommand() is a new simple function to send the completiontag for replication commands. Do this instead of sending a genericSELECT completion tag for them all, which was also pretty bogus (ifinnocuous). While at it, change StartReplication() to useEndReplicationCommand() instead of pg_puttextmessage().In commit2f96613, I failed to realize that replication commandsare not close-enough kin of regular SQL commands, so theDROP_REPLICATION_SLOT tag I added is undeserved and a type pun. Take itout.Backpatch to 13, where the latter commit appeared. The duplicate taghas been sent since 9.3, but since nothing is broken, it doesn't seemworth fixing.Per complaints from Tom Lane.Discussion:https://postgr.es/m/1347966.1600195735@sss.pgh.pa.us1 parent44fc6e2 commit07082b0
File tree
4 files changed
+34
-14
lines changed- src
- backend
- replication
- tcop
- include/tcop
4 files changed
+34
-14
lines changedLines changed: 21 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
799 | 799 |
| |
800 | 800 |
| |
801 | 801 |
| |
802 |
| - | |
| 802 | + | |
803 | 803 |
| |
804 | 804 |
| |
805 | 805 |
| |
| |||
1122 | 1122 |
| |
1123 | 1123 |
| |
1124 | 1124 |
| |
1125 |
| - | |
1126 |
| - | |
1127 | 1125 |
| |
1128 |
| - | |
1129 |
| - | |
1130 | 1126 |
| |
1131 | 1127 |
| |
1132 | 1128 |
| |
| |||
1517 | 1513 |
| |
1518 | 1514 |
| |
1519 | 1515 |
| |
| 1516 | + | |
1520 | 1517 |
| |
1521 | 1518 |
| |
1522 |
| - | |
1523 | 1519 |
| |
1524 | 1520 |
| |
1525 | 1521 |
| |
| |||
1619 | 1615 |
| |
1620 | 1616 |
| |
1621 | 1617 |
| |
| 1618 | + | |
1622 | 1619 |
| |
| 1620 | + | |
1623 | 1621 |
| |
1624 | 1622 |
| |
1625 | 1623 |
| |
1626 |
| - | |
| 1624 | + | |
| 1625 | + | |
1627 | 1626 |
| |
| 1627 | + | |
1628 | 1628 |
| |
1629 | 1629 |
| |
1630 | 1630 |
| |
| 1631 | + | |
1631 | 1632 |
| |
| 1633 | + | |
1632 | 1634 |
| |
1633 | 1635 |
| |
1634 | 1636 |
| |
| 1637 | + | |
1635 | 1638 |
| |
| 1639 | + | |
1636 | 1640 |
| |
1637 | 1641 |
| |
1638 | 1642 |
| |
1639 | 1643 |
| |
1640 | 1644 |
| |
1641 | 1645 |
| |
1642 |
| - | |
| 1646 | + | |
| 1647 | + | |
1643 | 1648 |
| |
1644 | 1649 |
| |
1645 | 1650 |
| |
1646 | 1651 |
| |
1647 | 1652 |
| |
1648 | 1653 |
| |
| 1654 | + | |
| 1655 | + | |
1649 | 1656 |
| |
1650 | 1657 |
| |
1651 | 1658 |
| |
1652 | 1659 |
| |
1653 | 1660 |
| |
1654 |
| - | |
| 1661 | + | |
| 1662 | + | |
1655 | 1663 |
| |
| 1664 | + | |
1656 | 1665 |
| |
1657 | 1666 |
| |
1658 | 1667 |
| |
1659 | 1668 |
| |
1660 | 1669 |
| |
1661 | 1670 |
| |
1662 | 1671 |
| |
| 1672 | + | |
| 1673 | + | |
1663 | 1674 |
| |
1664 | 1675 |
| |
1665 | 1676 |
| |
1666 | 1677 |
| |
| 1678 | + | |
1667 | 1679 |
| |
1668 | 1680 |
| |
1669 | 1681 |
| |
| |||
1676 | 1688 |
| |
1677 | 1689 |
| |
1678 | 1690 |
| |
1679 |
| - | |
1680 |
| - | |
1681 |
| - | |
1682 |
| - | |
1683 | 1691 |
| |
1684 | 1692 |
| |
1685 | 1693 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
214 | 226 |
| |
215 | 227 |
| |
216 | 228 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
160 |
| - | |
161 | 160 |
| |
162 | 161 |
| |
163 | 162 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| 142 | + | |
142 | 143 |
| |
143 | 144 |
| |
144 | 145 |
| |
|
0 commit comments
Comments
(0)