forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite55e6ec
committed
Fix replay of XLOG_HEAP_NEWPAGE WAL records to pay attention to the forknum
field of the WAL record. The previous coding always wrote to the main fork,resulting in data corruption if the page was meant to go into a non-defaultfork.At present, the only operation that can produce such WAL records isALTER TABLE/INDEX SET TABLESPACE when executed with archive_mode = on.Data corruption would be observed on standby slaves, and could occur on themaster as well if a database crash and recovery occurred after committingthe ALTER and before the next checkpoint. Per report from Gordon Shannon.Back-patch to 8.4; the problem doesn't exist in earlier branches becausewe didn't have a concept of multiple relation forks then.1 parent3a0939e commite55e6ec
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
4257 | 4257 |
| |
4258 | 4258 |
| |
4259 | 4259 |
| |
4260 |
| - | |
| 4260 | + | |
| 4261 | + | |
4261 | 4262 |
| |
| 4263 | + | |
4262 | 4264 |
| |
4263 | 4265 |
| |
4264 | 4266 |
| |
|
0 commit comments
Comments
(0)