forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0d369ac
committed
fd.c: Retry after EINTR in more places
Starting with4d330a6 we can use posix_fallocate() to extendfiles. Unfortunately in some situation, e.g. on tmpfs filesystems, EINTR maybe returned. See also4518c79.To fix, add a retry path to FileFallocate(). In contrast to4518c79 theamount we extend by is limited and the extending may happen at a highfrequency, so disabling signals does not appear to be the correct path here.Also add retry paths to other file operations currently lacking them (aroundfdatasync(), fsync(), ftruncate(), posix_fadvise(), sync_file_range(),truncate()) - they are all documented or have been observed to return EINTR.Even though most of these functions used in the back branches, it does notseem worth the risk to backpatch - outside of the new-to-16 case ofposix_fallocate() I am not aware of problem reports due to the lack ofretries.Reported-by: Christoph Berg <myon@debian.org>Discussion:https://postgr.es/m/ZEZDj1H61ryrmY9o@msg.df7cb.deBackpatch: -1 parent797f980 commit0d369ac
1 file changed
+61
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
419 | | - | |
420 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
422 | 430 | | |
423 | 431 | | |
424 | 432 | | |
| |||
448 | 456 | | |
449 | 457 | | |
450 | 458 | | |
451 | | - | |
452 | | - | |
453 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
454 | 462 | | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
455 | 471 | | |
456 | 472 | | |
457 | 473 | | |
| |||
483 | 499 | | |
484 | 500 | | |
485 | 501 | | |
| 502 | + | |
486 | 503 | | |
487 | 504 | | |
488 | 505 | | |
| |||
498 | 515 | | |
499 | 516 | | |
500 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
501 | 521 | | |
502 | 522 | | |
503 | 523 | | |
| |||
629 | 649 | | |
630 | 650 | | |
631 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
632 | 669 | | |
633 | 670 | | |
634 | 671 | | |
635 | 672 | | |
636 | 673 | | |
637 | 674 | | |
| 675 | + | |
638 | 676 | | |
639 | 677 | | |
640 | | - | |
641 | 678 | | |
642 | 679 | | |
643 | 680 | | |
644 | 681 | | |
645 | 682 | | |
646 | | - | |
| 683 | + | |
647 | 684 | | |
648 | 685 | | |
649 | 686 | | |
650 | 687 | | |
651 | 688 | | |
652 | 689 | | |
653 | | - | |
654 | | - | |
655 | 690 | | |
656 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
657 | 697 | | |
| 698 | + | |
| 699 | + | |
658 | 700 | | |
659 | 701 | | |
660 | 702 | | |
| |||
2001 | 2043 | | |
2002 | 2044 | | |
2003 | 2045 | | |
| 2046 | + | |
2004 | 2047 | | |
2005 | 2048 | | |
2006 | 2049 | | |
2007 | 2050 | | |
2008 | 2051 | | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
2009 | 2055 | | |
2010 | 2056 | | |
2011 | 2057 | | |
| |||
2281 | 2327 | | |
2282 | 2328 | | |
2283 | 2329 | | |
| 2330 | + | |
2284 | 2331 | | |
2285 | 2332 | | |
2286 | 2333 | | |
2287 | 2334 | | |
2288 | 2335 | | |
2289 | 2336 | | |
| 2337 | + | |
| 2338 | + | |
2290 | 2339 | | |
2291 | 2340 | | |
2292 | 2341 | | |
| |||
2334 | 2383 | | |
2335 | 2384 | | |
2336 | 2385 | | |
2337 | | - | |
| 2386 | + | |
2338 | 2387 | | |
2339 | 2388 | | |
2340 | 2389 | | |
| |||
0 commit comments
Comments
(0)