forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit91fa853
committed
Attempt to fix error recovery in COPY BOTH mode.
Previously, libpq and the backend had opposite ideas about whetherit was necessary for the client to send a CopyDone message afterreceiving an ErrorResponse, making it impossible to cleanly exitCOPY BOTH mode. Fix libpq so that works correctly, adopting thebackend's notion that an ErrorResponse kills the copy in bothdirections.Adjust receivelog.c to avoid a degradation in the quality of theresulting error messages. libpqwalreceiver.c is already doingthe right thing, so no adjustment needed there.Add an explicit statement to the documentation explaining howthis part of the protocol is supposed to work, in the hopes ofavoiding future confusion in this area.Since the consequences of all this confusion are very limited,especially in the back-branches where no client ever attemptsto exit COPY BOTH mode without closing the connection entirely,no back-patch.1 parent43e7a66 commit91fa853
File tree
3 files changed
+51
-36
lines changed- doc/src/sgml
- src
- bin/pg_basebackup
- interfaces/libpq
3 files changed
+51
-36
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1031 | 1031 |
| |
1032 | 1032 |
| |
1033 | 1033 |
| |
1034 |
| - | |
1035 |
| - | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1036 | 1041 |
| |
1037 | 1042 |
| |
1038 | 1043 |
| |
|
Lines changed: 28 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| |||
615 | 615 |
| |
616 | 616 |
| |
617 | 617 |
| |
618 |
| - | |
619 |
| - | |
620 |
| - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
621 | 622 |
| |
622 | 623 |
| |
623 | 624 |
| |
| |||
630 | 631 |
| |
631 | 632 |
| |
632 | 633 |
| |
633 |
| - | |
634 | 634 |
| |
635 | 635 |
| |
636 | 636 |
| |
| |||
708 | 708 |
| |
709 | 709 |
| |
710 | 710 |
| |
711 |
| - | |
712 |
| - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
713 | 714 |
| |
714 |
| - | |
| 715 | + | |
715 | 716 |
| |
716 | 717 |
| |
717 | 718 |
| |
| |||
832 | 833 |
| |
833 | 834 |
| |
834 | 835 |
| |
| 836 | + | |
| 837 | + | |
835 | 838 |
| |
836 |
| - | |
837 |
| - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
838 | 842 |
| |
839 | 843 |
| |
840 | 844 |
| |
| |||
843 | 847 |
| |
844 | 848 |
| |
845 | 849 |
| |
846 |
| - | |
| 850 | + | |
847 | 851 |
| |
848 |
| - | |
849 |
| - | |
850 |
| - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
851 | 860 |
| |
852 | 861 |
| |
853 | 862 |
| |
854 | 863 |
| |
855 | 864 |
| |
856 | 865 |
| |
857 |
| - | |
| 866 | + | |
858 | 867 |
| |
859 | 868 |
| |
860 | 869 |
| |
| |||
1030 | 1039 |
| |
1031 | 1040 |
| |
1032 | 1041 |
| |
1033 |
| - | |
| 1042 | + | |
1034 | 1043 |
|
Lines changed: 16 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1466 | 1466 |
| |
1467 | 1467 |
| |
1468 | 1468 |
| |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1469 | 1480 |
| |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
1470 | 1486 |
| |
1471 | 1487 |
| |
1472 | 1488 |
| |
| |||
1499 | 1515 |
| |
1500 | 1516 |
| |
1501 | 1517 |
| |
1502 |
| - | |
1503 |
| - | |
1504 |
| - | |
1505 |
| - | |
1506 |
| - | |
1507 |
| - | |
1508 |
| - | |
1509 |
| - | |
1510 |
| - | |
1511 |
| - | |
1512 |
| - | |
1513 |
| - | |
1514 |
| - | |
1515 |
| - | |
1516 | 1518 |
| |
1517 |
| - | |
1518 | 1519 |
| |
1519 | 1520 |
| |
1520 | 1521 |
| |
|
0 commit comments
Comments
(0)