forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit77cfcb8
Improve truncation of pg_serial/, removing "apparent wraparound" LOGs
It is possible that the tail XID of pg_serial/ gets ahead of its headXID, which would cause the truncation of pg_serial/ done duringcheckpoints to show up as a "wraparound" LOG in SimpleLruTruncate(),which is confusing. This also wastes a bit of disk space until the headpage is reclaimed again.CheckPointPredicate() is changed so as the cutoff page for thetruncation is switched to the head page if the tail XID has advancedbeyond the head XID, rather than the tail page. This prevents theconfusing LOG message about a wraparound while allowing some truncationto be done to cut in disk space.This could be considered as a bug fix, but the original behavior isharmless as well, resulting only in disk space temporarily wasted, sono backpatch is done.Author: Sami ImseihReviewed-by: Heikki Linnakangas, Michael PaquierDiscussion:https://postgr.es/m/755E19CA-D02C-4A4C-80D3-74F775410C48@amazon.com1 parentd62a839 commit77cfcb8
1 file changed
+20
-4
lines changedLines changed: 20 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1004 | 1004 |
| |
1005 | 1005 |
| |
1006 | 1006 |
| |
1007 |
| - | |
| 1007 | + | |
1008 | 1008 |
| |
1009 | 1009 |
| |
1010 | 1010 |
| |
| |||
1017 | 1017 |
| |
1018 | 1018 |
| |
1019 | 1019 |
| |
1020 |
| - | |
| 1020 | + | |
| 1021 | + | |
1021 | 1022 |
| |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1022 | 1038 |
| |
1023 | 1039 |
| |
1024 | 1040 |
| |
| |||
1051 | 1067 |
| |
1052 | 1068 |
| |
1053 | 1069 |
| |
1054 |
| - | |
| 1070 | + | |
1055 | 1071 |
| |
1056 | 1072 |
| |
1057 | 1073 |
| |
1058 | 1074 |
| |
1059 | 1075 |
| |
1060 | 1076 |
| |
1061 |
| - | |
| 1077 | + | |
1062 | 1078 |
| |
1063 | 1079 |
| |
1064 | 1080 |
| |
|
0 commit comments
Comments
(0)