- Notifications
You must be signed in to change notification settings - Fork5
Commit2a8e1ac
committed
Set the all-visible flag on heap page before writing WAL record, not after.
If we set the all-visible flag after writing WAL record, and XLogInserttakes a full-page image of the page, the image would not include the flag.We will then proceed to set the VM bit, which would then be set without thecorresponding all-visible flag on the heap page.Found by comparing page images on master and standby, after writing/replayingeach WAL record. (There is still a discrepancy: the all-visible flag won'tbe set after replaying the HEAP_CLEAN record, even though it is set in themaster. However, it will be set when replaying the HEAP2_VISIBLE record andsetting the VM bit, so the all-visible flag and VM bit are always consistenton the standby, even though they are momentarily out-of-sync with master)Backpatch to 9.3 where this code was introduced.1 parent5f86cbd commit2a8e1ac
1 file changed
+11
-5
lines changedLines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1213 | 1213 |
| |
1214 | 1214 |
| |
1215 | 1215 |
| |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1216 | 1223 |
| |
1217 | 1224 |
| |
1218 | 1225 |
| |
| |||
1231 | 1238 |
| |
1232 | 1239 |
| |
1233 | 1240 |
| |
1234 |
| - | |
1235 |
| - | |
| 1241 | + | |
| 1242 | + | |
1236 | 1243 |
| |
1237 |
| - | |
1238 |
| - | |
| 1244 | + | |
| 1245 | + | |
1239 | 1246 |
| |
1240 | 1247 |
| |
1241 |
| - | |
1242 | 1248 |
| |
1243 | 1249 |
| |
1244 | 1250 |
| |
|
0 commit comments
Comments
(0)