forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita590f26
committed
BRIN: fix bug in xlog backup block counting
The code that generates the BRIN_XLOG_UPDATE removes the bufferreference when the page that's target for the updated tuple is freshlyinitialized. This is a pretty usual optimization, but was breaking thecase where the revmap buffer, which is referenced in the same WALrecord, is getting a backup block: the replay code was using backupblock index 1, which is not valid when the update target buffer getspruned; the revmap buffer gets assigned 0 instead. Make sure to use thecorrect backup block index for revmap when replaying.Bug reported by Fujii Masao.1 parentc8df947 commita590f26
1 file changed
+8
-4
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
63 |
| - | |
64 |
| - | |
65 |
| - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
66 | 68 |
| |
67 | 69 |
| |
68 | 70 |
| |
| |||
97 | 99 |
| |
98 | 100 |
| |
99 | 101 |
| |
100 |
| - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 |
| |
102 | 106 |
| |
103 | 107 |
| |
|
0 commit comments
Comments
(0)