forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1667148
committed
Improve representation of 'moved partitions' indicator on deleted tuples.
Previously a tuple that has been moved to a different partition (seef16241b), set the block number on the old tuple to an invalidvalue to indicate that fact. But the tuple offset was leftuntouched. That turned out to trigger a wal_consistency_checkingfailure as reported by Peter Geoghegan, as the offset wasn'talways overwritten during WAL replay.Heikki observed that we're wasting valuable data by not puttinginformation also in the offset. Thus set that toMovedPartitionsOffsetNumber when a tuple indicates it has moved.We continue to set the block number to MovedPartitionsBlockNumber, asthat seems more likely to cause problems for code not updated to knowabout moved tuples.As t_ctid's offset number is now always set, this refinement alsofixes the wal_consistency_checking issue.This technically is a minor disk format break, with previously createdmoved tuples not being recognized anymore. But since there not evenhas been a beta release sincef16241b...Reported-By: Peter GeogheganAuthor: Heikki Linnakangas, Amul SulDiscussion:https://postgr.es/m/CAH2-Wzm9ty+1BX7-GMNJ=xPRg67oJTVeDNdA9LSyJJtMgRiCMA@mail.gmail.com1 parent37a3058 commit1667148
2 files changed
+39
-19
lines changedLines changed: 12 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
90 | 91 |
| |
91 | 92 |
| |
92 |
| - | |
| 93 | + | |
| 94 | + | |
93 | 95 |
| |
94 | 96 |
| |
95 | 97 |
| |
| |||
287 | 289 |
| |
288 | 290 |
| |
289 | 291 |
| |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
296 |
| - | |
297 |
| - | |
298 | 292 |
| |
299 | 293 |
| |
300 | 294 |
| |
| |||
447 | 441 |
| |
448 | 442 |
| |
449 | 443 |
| |
450 |
| - | |
451 |
| - | |
452 |
| - | |
453 | 444 |
| |
454 |
| - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
455 | 450 |
| |
456 | 451 |
| |
457 | 452 |
| |
|
Lines changed: 27 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
51 | 73 |
| |
52 | 74 |
| |
53 | 75 |
| |
| |||
160 | 182 |
| |
161 | 183 |
| |
162 | 184 |
| |
163 |
| - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
164 | 189 |
| |
165 | 190 |
| |
166 | 191 |
| |
167 | 192 |
| |
168 | 193 |
| |
169 | 194 |
| |
170 | 195 |
| |
171 |
| - | |
| 196 | + | |
172 | 197 |
| |
173 | 198 |
| |
174 | 199 |
| |
|
0 commit comments
Comments
(0)