Commit 0bda14d
committed
logical decoding: old/newtuple in spooled UPDATE changes was switched around.
Somehow I managed to flip the order of restoring old & new tuples when
de-spooling a change in a large transaction from disk. This happens to
only take effect when a change is spooled to disk which has old/new
versions of the tuple. That only is the case for UPDATEs where he
primary key changed or where replica identity is changed to FULL.
The tests didn't catch this because either spooled updates, or updates
that changed primary keys, were tested; not both at the same time.
Found while adding tests for the following commit.
Backpatch: 9.4, where logical decoding was added1 parent d9e903f commit 0bda14d
File tree
3 files changed
+37
-10
lines changed- contrib/test_decoding
- expected
- sql
- src/backend/replication/logical
3 files changed
+37
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
243 | 258 | | |
244 | 259 | | |
245 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
126 | 138 | | |
127 | 139 | | |
128 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2335 | 2335 | | |
2336 | 2336 | | |
2337 | 2337 | | |
2338 | | - | |
| 2338 | + | |
2339 | 2339 | | |
2340 | 2340 | | |
2341 | 2341 | | |
2342 | 2342 | | |
2343 | | - | |
2344 | | - | |
2345 | | - | |
2346 | | - | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
2347 | 2347 | | |
2348 | 2348 | | |
2349 | 2349 | | |
2350 | | - | |
| 2350 | + | |
2351 | 2351 | | |
2352 | 2352 | | |
2353 | 2353 | | |
2354 | 2354 | | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
2359 | 2359 | | |
2360 | 2360 | | |
2361 | 2361 | | |
| |||
0 commit comments