forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2b5819e
committed
Do not summarize WAL if generated with wal_level=minimal.
To do this, we must include the wal_level in the first WAL recordcovered by each summary file; so add wal_level to struct Checkpointand the payload of XLOG_CHECKPOINT_REDO and XLOG_END_OF_RECOVERY.This, in turn, requires bumping XLOG_PAGE_MAGIC and, since theCheckpoint is also stored in the control file, alsoPG_CONTROL_VERSION. It's not great to do that so late in the releasecycle, but the alternative seems to ship v17 without robustprotections against this scenario, which could result in corruptedincremental backups.A side effect of this patch is that, when a server withwal_level=replica is started with summarize_wal=on for the first time,summarization will no longer begin with the oldest WAL that stillexists in pg_wal, but rather from the first checkpoint after that.This change should be harmless, because a WAL summary for a partialcheckpoint cycle can never make an incremental backup possible whenit would otherwise not have been.Report by Fujii Masao. Patch by me. Review and/or testing by JakubWartak and Fujii Masao.Discussion:http://postgr.es/m/6e30082e-041b-4e31-9633-95a66de76f5d@oss.nttdata.com1 parent4cbd8c6 commit2b5819e
File tree
9 files changed
+278
-81
lines changed- doc/src/sgml
- src
- backend
- access
- rmgrdesc
- transam
- postmaster
- bin/pg_combinebackup
- t
- include
- access
- catalog
9 files changed
+278
-81
lines changedLines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4318 | 4318 |
| |
4319 | 4319 |
| |
4320 | 4320 |
| |
4321 |
| - | |
4322 |
| - | |
4323 |
| - | |
4324 |
| - | |
4325 |
| - | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
| 4324 | + | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
| 4330 | + | |
| 4331 | + | |
4326 | 4332 |
| |
4327 | 4333 |
| |
4328 | 4334 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27960 | 27960 |
| |
27961 | 27961 |
| |
27962 | 27962 |
| |
| 27963 | + | |
| 27964 | + | |
| 27965 | + | |
| 27966 | + | |
| 27967 | + | |
| 27968 | + | |
| 27969 | + | |
| 27970 | + | |
| 27971 | + | |
| 27972 | + | |
| 27973 | + | |
27963 | 27974 |
| |
27964 | 27975 |
| |
27965 | 27976 |
| |
|
Lines changed: 31 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
36 | 57 |
| |
37 | 58 |
| |
38 | 59 |
| |
| |||
45 | 66 |
| |
46 | 67 |
| |
47 | 68 |
| |
48 |
| - | |
| 69 | + | |
49 | 70 |
| |
50 | 71 |
| |
51 | 72 |
| |
52 | 73 |
| |
53 | 74 |
| |
54 | 75 |
| |
55 | 76 |
| |
| 77 | + | |
56 | 78 |
| |
57 | 79 |
| |
58 | 80 |
| |
| |||
95 | 117 |
| |
96 | 118 |
| |
97 | 119 |
| |
98 |
| - | |
99 | 120 |
| |
100 | 121 |
| |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
| 122 | + | |
112 | 123 |
| |
113 | 124 |
| |
114 | 125 |
| |
| |||
135 | 146 |
| |
136 | 147 |
| |
137 | 148 |
| |
138 |
| - | |
| 149 | + | |
139 | 150 |
| |
140 |
| - | |
| 151 | + | |
| 152 | + | |
141 | 153 |
| |
142 | 154 |
| |
143 | 155 |
| |
| |||
150 | 162 |
| |
151 | 163 |
| |
152 | 164 |
| |
153 |
| - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
154 | 169 |
| |
155 | 170 |
| |
156 | 171 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6934 | 6934 |
| |
6935 | 6935 |
| |
6936 | 6936 |
| |
| 6937 | + | |
6937 | 6938 |
| |
6938 | 6939 |
| |
6939 | 6940 |
| |
| |||
6987 | 6988 |
| |
6988 | 6989 |
| |
6989 | 6990 |
| |
6990 |
| - | |
6991 |
| - | |
6992 |
| - | |
| 6991 | + | |
6993 | 6992 |
| |
6994 |
| - | |
| 6993 | + | |
6995 | 6994 |
| |
6996 | 6995 |
| |
6997 | 6996 |
| |
| |||
7314 | 7313 |
| |
7315 | 7314 |
| |
7316 | 7315 |
| |
| 7316 | + | |
7317 | 7317 |
| |
7318 | 7318 |
| |
7319 | 7319 |
| |
|
0 commit comments
Comments
(0)