- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitcbed472
Don't ERROR on PreallocXlogFiles() race condition.
Before a restartpoint finishes PreallocXlogFiles(), a startup processKeepFileRestoredFromArchive() call can unlink the preallocated segment.If a CHECKPOINT sql command had elicited the restartpoint experiencingthe race condition, that sql command failed. Moreover, the restartpointomitted its log_checkpoints message and some inessential resourcereclamation. Prevent the ERROR by skipping open() of the segment.Since these consequences are so minor, no back-patch.This commit has been applied as of2b3e467 in v15 and newerversions. This is required on stable branches of v13 and v14 to fix aregression reported by Noah Misch, introduced by1f95181, causingspurious failures in archive recovery (neither streaming nor archiverecovery) with concurrent restartpoints. The backpatched versions ofthe patches have been aligned on these branches by me, Noah Misch is theauthor. Tests have been conducted by the both of us.Reported-by: Arun ThirupathiAuthor: Noah Misch <noah@leadboat.com>Discussion:https://postgr.es/m/20210202151416.GB3304930@rfd.leadboat.comDiscussion:https://postgr.es/m/20250306193013.36.nmisch@google.comBackpatch-through: 131 parente77d9cd commitcbed472
File tree
3 files changed
+58
-27
lines changed- src
- backend
- access/transam
- replication
- include/access
3 files changed
+58
-27
lines changedLines changed: 56 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2440 | 2440 |
| |
2441 | 2441 |
| |
2442 | 2442 |
| |
2443 |
| - | |
2444 | 2443 |
| |
2445 | 2444 |
| |
2446 | 2445 |
| |
| |||
2507 | 2506 |
| |
2508 | 2507 |
| |
2509 | 2508 |
| |
2510 |
| - | |
| 2509 | + | |
2511 | 2510 |
| |
2512 | 2511 |
| |
2513 | 2512 |
| |
| |||
3253 | 3252 |
| |
3254 | 3253 |
| |
3255 | 3254 |
| |
3256 |
| - | |
| 3255 | + | |
3257 | 3256 |
| |
3258 |
| - | |
| 3257 | + | |
3259 | 3258 |
| |
3260 | 3259 |
| |
3261 | 3260 |
| |
3262 |
| - | |
| 3261 | + | |
3263 | 3262 |
| |
3264 |
| - | |
3265 |
| - | |
3266 |
| - | |
3267 |
| - | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
3268 | 3266 |
| |
3269 |
| - | |
3270 |
| - | |
| 3267 | + | |
| 3268 | + | |
3271 | 3269 |
| |
3272 |
| - | |
3273 | 3270 |
| |
3274 | 3271 |
| |
3275 | 3272 |
| |
| |||
3407 | 3404 |
| |
3408 | 3405 |
| |
3409 | 3406 |
| |
| 3407 | + | |
3410 | 3408 |
| |
| 3409 | + | |
| 3410 | + | |
3411 | 3411 |
| |
3412 | 3412 |
| |
3413 | 3413 |
| |
3414 | 3414 |
| |
3415 |
| - | |
3416 |
| - | |
| 3415 | + | |
| 3416 | + | |
3417 | 3417 |
| |
3418 | 3418 |
| |
| 3419 | + | |
3419 | 3420 |
| |
3420 | 3421 |
| |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
3421 | 3448 |
| |
3422 | 3449 |
| |
3423 | 3450 |
| |
3424 | 3451 |
| |
3425 | 3452 |
| |
3426 | 3453 |
| |
3427 |
| - | |
3428 |
| - | |
3429 |
| - | |
3430 | 3454 |
| |
3431 | 3455 |
| |
3432 | 3456 |
| |
| |||
3883 | 3907 |
| |
3884 | 3908 |
| |
3885 | 3909 |
| |
| 3910 | + | |
| 3911 | + | |
| 3912 | + | |
| 3913 | + | |
| 3914 | + | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
| 3918 | + | |
3886 | 3919 |
| |
3887 | 3920 |
| |
3888 | 3921 |
| |
3889 | 3922 |
| |
3890 | 3923 |
| |
3891 | 3924 |
| |
3892 | 3925 |
| |
| 3926 | + | |
3893 | 3927 |
| |
3894 | 3928 |
| |
3895 | 3929 |
| |
3896 | 3930 |
| |
3897 | 3931 |
| |
3898 | 3932 |
| |
3899 | 3933 |
| |
3900 |
| - | |
3901 |
| - | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
3902 | 3937 |
| |
3903 | 3938 |
| |
3904 | 3939 |
| |
| |||
5212 | 5247 |
| |
5213 | 5248 |
| |
5214 | 5249 |
| |
5215 |
| - | |
5216 | 5250 |
| |
5217 | 5251 |
| |
5218 | 5252 |
| |
| |||
5309 | 5343 |
| |
5310 | 5344 |
| |
5311 | 5345 |
| |
5312 |
| - | |
| 5346 | + | |
5313 | 5347 |
| |
5314 | 5348 |
| |
5315 | 5349 |
| |
| |||
5615 | 5649 |
| |
5616 | 5650 |
| |
5617 | 5651 |
| |
5618 |
| - | |
5619 | 5652 |
| |
5620 | 5653 |
| |
5621 |
| - | |
| 5654 | + | |
5622 | 5655 |
| |
5623 | 5656 |
| |
5624 | 5657 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
918 | 918 |
| |
919 | 919 |
| |
920 | 920 |
| |
921 |
| - | |
922 |
| - | |
923 | 921 |
| |
924 | 922 |
| |
925 |
| - | |
| 923 | + | |
926 | 924 |
| |
927 | 925 |
| |
928 | 926 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
289 |
| - | |
| 289 | + | |
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
|
0 commit comments
Comments
(0)