forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit561885d
committed
Improve error handling in RemovePgTempFiles().
Modify this function and its subsidiaries so that syscall failures arereported via ereport(LOG), rather than silently ignored as before.We don't want to throw a hard ERROR, as that would prevent databasestartup, and getting rid of leftover temporary files is not importantenough for that. On the other hand, not reporting trouble at allseems like an odd choice not in line with current project norms,especially since any failure here is quite unexpected.On the same reasoning, adjust these functions' AllocateDir/ReadDir callsso that failure to scan a directory results in LOG not ERROR. I alsoremoved the previous practice of silently ignoring ENOENT failures duringdirectory opens --- there are some corner cases where that could happengiven a previous database crash, but that seems like a bad excuse forignoring a condition that isn't expected in most cases. A LOG messageduring postmaster start seems OK in such situations, and better thanno output at all.In passing, make RemovePgTempRelationFiles' test for "is the file nameall digits" look more like the way it's done elsewhere.Discussion:https://postgr.es/m/19907.1512402254@sss.pgh.pa.us1 parent2069e6f commit561885d
1 file changed
+35
-35
lines changedLines changed: 35 additions & 35 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2994 | 2994 |
| |
2995 | 2995 |
| |
2996 | 2996 |
| |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
2997 | 3001 |
| |
2998 | 3002 |
| |
2999 | 3003 |
| |
| |||
3014 | 3018 |
| |
3015 | 3019 |
| |
3016 | 3020 |
| |
3017 |
| - | |
| 3021 | + | |
3018 | 3022 |
| |
3019 | 3023 |
| |
3020 | 3024 |
| |
| |||
3055 | 3059 |
| |
3056 | 3060 |
| |
3057 | 3061 |
| |
3058 |
| - | |
3059 |
| - | |
3060 |
| - | |
3061 |
| - | |
3062 |
| - | |
3063 |
| - | |
3064 |
| - | |
3065 |
| - | |
3066 |
| - | |
3067 |
| - | |
3068 | 3062 |
| |
3069 |
| - | |
| 3063 | + | |
3070 | 3064 |
| |
3071 | 3065 |
| |
3072 | 3066 |
| |
| |||
3082 | 3076 |
| |
3083 | 3077 |
| |
3084 | 3078 |
| |
3085 |
| - | |
3086 | 3079 |
| |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
3087 | 3084 |
| |
| 3085 | + | |
3088 | 3086 |
| |
3089 | 3087 |
| |
3090 | 3088 |
| |
| 3089 | + | |
3091 | 3090 |
| |
3092 |
| - | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
3093 | 3097 |
| |
3094 | 3098 |
| |
3095 |
| - | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
3096 | 3106 |
| |
3097 | 3107 |
| |
3098 |
| - | |
3099 |
| - | |
3100 |
| - | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
3101 | 3111 |
| |
3102 | 3112 |
| |
3103 | 3113 |
| |
| |||
3112 | 3122 |
| |
3113 | 3123 |
| |
3114 | 3124 |
| |
3115 |
| - | |
3116 |
| - | |
3117 |
| - | |
3118 |
| - | |
3119 |
| - | |
3120 |
| - | |
3121 |
| - | |
3122 |
| - | |
3123 |
| - | |
3124 |
| - | |
3125 | 3125 |
| |
3126 |
| - | |
| 3126 | + | |
3127 | 3127 |
| |
3128 |
| - | |
3129 |
| - | |
3130 | 3128 |
| |
3131 | 3129 |
| |
3132 | 3130 |
| |
3133 | 3131 |
| |
3134 | 3132 |
| |
3135 |
| - | |
3136 |
| - | |
3137 |
| - | |
| 3133 | + | |
3138 | 3134 |
| |
3139 | 3135 |
| |
3140 | 3136 |
| |
| |||
3163 | 3159 |
| |
3164 | 3160 |
| |
3165 | 3161 |
| |
3166 |
| - | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
3167 | 3167 |
| |
3168 | 3168 |
| |
3169 | 3169 |
| |
|
0 commit comments
Comments
(0)