forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita28db20
committed
In successful pg_recvlogical, end PGRES_COPY_OUT cleanly.
pg_recvlogical merely called PQfinish(), so the backend sent messagesafter the disconnect. When that caused EPIPE in internal_flush(),before a LogicalConfirmReceivedLocation(), the next pg_recvlogical wouldrepeat already-acknowledged records. Whether or not the defect causesEPIPE, post-disconnect messages could contain an ErrorResponse that theuser should see. One properly ends PGRES_COPY_OUT by repeatingPQgetCopyData() until it returns a negative value. Augment one of thetests to cover the case of WAL past --endpos. Back-patch to v10, wherecommit7c03078 first appeared. Beforethat commit, pg_recvlogical never reached PGRES_COPY_OUT.Reported by Thomas Munro.Discussion:https://postgr.es/m/CAEepm=1MzM2Z_xNe4foGwZ1a+MO_2S9oYDq3M5D11=JDU_+0Nw@mail.gmail.com1 parenta411361 commita28db20
File tree
2 files changed
+36
-5
lines changed- src
- bin/pg_basebackup
- test/recovery/t
2 files changed
+36
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| 607 | + | |
| 608 | + | |
607 | 609 | | |
608 | 610 | | |
609 | | - | |
610 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
611 | 616 | | |
612 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
613 | 639 | | |
614 | | - | |
| 640 | + | |
615 | 641 | | |
616 | 642 | | |
617 | 643 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
92 | | - | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| |||
0 commit comments
Comments
(0)