forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5fc1008
committed
Clean up temporary WAL segments after an instance crash
Temporary WAL segments are created in pg_wal and named as xlogtemp.pidbefore being renamed to the real deal when creating a new segment. Ifan instance crashes after the temporary segment is created and beforethe rename is done, then the server would finish with unremovable data.After an instance crash, scan pg_wal and remove any such segments. Withrepetitive unlucky crashes this would contribute to disk bloat andpresents risks of ENOSPC especially with max_wal_size close to themaximum allowed.Author: Michael PaquierReviewed-by: Yugo Nagata, Heikki LinnakangasDiscussion:https://postgr.es/m/20180514054955.GF1528@paquier.xyz1 parent5e6e2c8 commit5fc1008
1 file changed
+45
-7
lines changedLines changed: 45 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
887 | 887 |
| |
888 | 888 |
| |
889 | 889 |
| |
| 890 | + | |
890 | 891 |
| |
891 | 892 |
| |
892 | 893 |
| |
| |||
3863 | 3864 |
| |
3864 | 3865 |
| |
3865 | 3866 |
| |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
| 3881 | + | |
| 3882 | + | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
| 3887 | + | |
| 3888 | + | |
| 3889 | + | |
| 3890 | + | |
| 3891 | + | |
| 3892 | + | |
| 3893 | + | |
| 3894 | + | |
| 3895 | + | |
3866 | 3896 |
| |
3867 | 3897 |
| |
3868 | 3898 |
| |
| |||
6379 | 6409 |
| |
6380 | 6410 |
| |
6381 | 6411 |
| |
6382 |
| - | |
6383 |
| - | |
6384 |
| - | |
6385 |
| - | |
6386 |
| - | |
6387 |
| - | |
6388 |
| - | |
| 6412 | + | |
| 6413 | + | |
| 6414 | + | |
| 6415 | + | |
| 6416 | + | |
| 6417 | + | |
| 6418 | + | |
| 6419 | + | |
| 6420 | + | |
| 6421 | + | |
| 6422 | + | |
| 6423 | + | |
6389 | 6424 |
| |
6390 | 6425 |
| |
6391 | 6426 |
| |
| 6427 | + | |
| 6428 | + | |
6392 | 6429 |
| |
| 6430 | + | |
6393 | 6431 |
| |
6394 | 6432 |
| |
6395 | 6433 |
| |
|
0 commit comments
Comments
(0)