forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit499c9b1
committed
Improve some check logic in pg_receivewal
The following things are improved:- Fetch the system identifier from the source server before anyWAL streaming loop. This triggers extra checks to make sure thatpg_receivewal is still connected to a server with the same system IDwith a correct timeline.- Switch umask() (for file creation mode mask) and RetrieveWalSegSize()(to fetch the size of WAL segments) a bit later before the initialstream attempt. If the connection was done with a database,pg_receivewal would fail but those commands were still executed, whichwas a waste. The slot creation and drop are now done before retrievingthe segment size.Author: Bharath RupireddyReviewed-by: Ronan Dunklau, Michael PaquierDiscussion:https://postgr.es/m/CALj2ACX00YYeyBfoi55Cy=NrP-FcfMgiYYx1qRUEib3yjCVoaA@mail.gmail.com1 parentd7897ab commit499c9b1
1 file changed
+18
-15
lines changedLines changed: 18 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
372 | 372 |
| |
373 | 373 |
| |
374 | 374 |
| |
| 375 | + | |
375 | 376 |
| |
376 | 377 |
| |
377 | 378 |
| |
| |||
399 | 400 |
| |
400 | 401 |
| |
401 | 402 |
| |
402 |
| - | |
| 403 | + | |
403 | 404 |
| |
404 | 405 |
| |
405 | 406 |
| |
| |||
435 | 436 |
| |
436 | 437 |
| |
437 | 438 |
| |
| 439 | + | |
438 | 440 |
| |
439 | 441 |
| |
440 | 442 |
| |
| |||
449 | 451 |
| |
450 | 452 |
| |
451 | 453 |
| |
| 454 | + | |
452 | 455 |
| |
453 | 456 |
| |
454 | 457 |
| |
| |||
687 | 690 |
| |
688 | 691 |
| |
689 | 692 |
| |
690 |
| - | |
691 |
| - | |
692 |
| - | |
693 |
| - | |
694 |
| - | |
695 |
| - | |
696 |
| - | |
697 |
| - | |
698 |
| - | |
699 |
| - | |
700 |
| - | |
701 |
| - | |
702 |
| - | |
703 |
| - | |
704 | 693 |
| |
705 | 694 |
| |
706 | 695 |
| |
| |||
712 | 701 |
| |
713 | 702 |
| |
714 | 703 |
| |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
715 | 714 |
| |
716 | 715 |
| |
717 | 716 |
| |
| |||
737 | 736 |
| |
738 | 737 |
| |
739 | 738 |
| |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
740 | 743 |
| |
741 | 744 |
| |
742 | 745 |
| |
|
0 commit comments
Comments
(0)