Commit cb2acb1
committed
Add missing_ok option to the SQL functions for reading files.
This makes it possible to use the functions without getting errors, if there
is a chance that the file might be removed or renamed concurrently.
pg_rewind needs to do just that, although this could be useful for other
purposes too. (The changes to pg_rewind to use these functions will come in
a separate commit.)
The read_binary_file() function isn't very well-suited for extensions.c's
purposes anymore, if it ever was. So bite the bullet and make a copy of it
in extension.c, tailored for that use case. This seems better than the
accidental code reuse, even if it's a some more lines of code.
Michael Paquier, with plenty of kibitzing by me.1 parent cca8ba9 commit cb2acb1
File tree
6 files changed
+272
-100
lines changed- doc/src/sgml
- src
- backend
- commands
- utils/adt
- include
- catalog
- utils
6 files changed
+272
-100
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17811 | 17811 | | |
17812 | 17812 | | |
17813 | 17813 | | |
17814 | | - | |
| 17814 | + | |
17815 | 17815 | | |
17816 | 17816 | | |
17817 | | - | |
| 17817 | + | |
| 17818 | + | |
| 17819 | + | |
17818 | 17820 | | |
17819 | 17821 | | |
17820 | 17822 | | |
17821 | | - | |
| 17823 | + | |
17822 | 17824 | | |
17823 | 17825 | | |
17824 | | - | |
| 17826 | + | |
| 17827 | + | |
| 17828 | + | |
17825 | 17829 | | |
17826 | 17830 | | |
17827 | 17831 | | |
17828 | | - | |
| 17832 | + | |
17829 | 17833 | | |
17830 | 17834 | | |
17831 | | - | |
| 17835 | + | |
| 17836 | + | |
| 17837 | + | |
17832 | 17838 | | |
17833 | 17839 | | |
17834 | 17840 | | |
17835 | | - | |
| 17841 | + | |
17836 | 17842 | | |
17837 | 17843 | | |
17838 | | - | |
| 17844 | + | |
| 17845 | + | |
| 17846 | + | |
17839 | 17847 | | |
17840 | 17848 | | |
17841 | 17849 | | |
17842 | 17850 | | |
17843 | 17851 | | |
| 17852 | + | |
| 17853 | + | |
| 17854 | + | |
| 17855 | + | |
| 17856 | + | |
| 17857 | + | |
| 17858 | + | |
| 17859 | + | |
17844 | 17860 | | |
17845 | 17861 | | |
17846 | 17862 | | |
17847 | 17863 | | |
17848 | | - | |
17849 | | - | |
17850 | | - | |
| 17864 | + | |
| 17865 | + | |
| 17866 | + | |
| 17867 | + | |
| 17868 | + | |
| 17869 | + | |
| 17870 | + | |
17851 | 17871 | | |
17852 | 17872 | | |
17853 | 17873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| |||
635 | 639 | | |
636 | 640 | | |
637 | 641 | | |
638 | | - | |
639 | 642 | | |
640 | 643 | | |
641 | 644 | | |
642 | 645 | | |
643 | | - | |
| 646 | + | |
644 | 647 | | |
645 | 648 | | |
646 | 649 | | |
| |||
649 | 652 | | |
650 | 653 | | |
651 | 654 | | |
652 | | - | |
653 | | - | |
654 | 655 | | |
655 | 656 | | |
656 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
657 | 662 | | |
658 | 663 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | 664 | | |
668 | 665 | | |
669 | 666 | | |
| |||
3008 | 3005 | | |
3009 | 3006 | | |
3010 | 3007 | | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
0 commit comments