forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit29b5905

Amit Kapila
Fix toast rewrites in logical decoding.
Commit325f2ec introduced pg_class.relwrite to skip operations ontables created as part of a heap rewrite during DDL. It links suchtransient heaps to the original relation OID via this new field inpg_class but forgot to do anything about toast tables. So, logicaldecoding was not able to skip operations on internally created toasttables. This leads to an error when we tried to decode the WAL for thenext operation for which it appeared that there is a toast data whereactually it didn't have any toast data.To fix this, we set pg_class.relwrite for internally created toast tablesas well which allowed skipping operations on them during logical decoding.Author: Bertrand DrouvotReviewed-by: David Zhang, Amit KapilaBackpatch-through: 11, where it was introducedDiscussion:https://postgr.es/m/b5146fb1-ad9e-7d6e-f980-98ed68744a7c@amazon.com1 parent255ed90 commit29b5905
File tree
7 files changed
+99
-13
lines changed- contrib/test_decoding
- expected
- sql
- src
- backend
- catalog
- commands
- include
- catalog
- commands
7 files changed
+99
-13
lines changedLines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
360 | 360 |
| |
361 | 361 |
| |
362 | 362 |
| |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
363 | 385 |
| |
364 | 386 |
| |
365 | 387 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
308 | 308 |
| |
309 | 309 |
| |
310 | 310 |
| |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
311 | 327 |
|
Lines changed: 18 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
| 39 | + | |
| 40 | + | |
40 | 41 |
| |
41 |
| - | |
| 42 | + | |
| 43 | + | |
42 | 44 |
| |
43 | 45 |
| |
44 | 46 |
| |
| |||
57 | 59 |
| |
58 | 60 |
| |
59 | 61 |
| |
60 |
| - | |
| 62 | + | |
61 | 63 |
| |
62 | 64 |
| |
63 | 65 |
| |
64 |
| - | |
| 66 | + | |
| 67 | + | |
65 | 68 |
| |
66 |
| - | |
| 69 | + | |
67 | 70 |
| |
68 | 71 |
| |
69 | 72 |
| |
70 | 73 |
| |
71 | 74 |
| |
72 |
| - | |
| 75 | + | |
| 76 | + | |
73 | 77 |
| |
74 | 78 |
| |
75 | 79 |
| |
76 |
| - | |
| 80 | + | |
| 81 | + | |
77 | 82 |
| |
78 | 83 |
| |
79 | 84 |
| |
80 | 85 |
| |
81 | 86 |
| |
82 | 87 |
| |
83 |
| - | |
| 88 | + | |
| 89 | + | |
84 | 90 |
| |
85 | 91 |
| |
86 | 92 |
| |
| |||
104 | 110 |
| |
105 | 111 |
| |
106 | 112 |
| |
107 |
| - | |
| 113 | + | |
108 | 114 |
| |
109 | 115 |
| |
110 | 116 |
| |
| |||
121 | 127 |
| |
122 | 128 |
| |
123 | 129 |
| |
124 |
| - | |
| 130 | + | |
| 131 | + | |
125 | 132 |
| |
126 | 133 |
| |
127 | 134 |
| |
| |||
258 | 265 |
| |
259 | 266 |
| |
260 | 267 |
| |
261 |
| - | |
| 268 | + | |
262 | 269 |
| |
263 | 270 |
| |
264 | 271 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
735 | 735 |
| |
736 | 736 |
| |
737 | 737 |
| |
738 |
| - | |
| 738 | + | |
739 | 739 |
| |
740 | 740 |
| |
741 | 741 |
| |
| |||
1526 | 1526 |
| |
1527 | 1527 |
| |
1528 | 1528 |
| |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
1529 | 1537 |
| |
1530 | 1538 |
| |
1531 | 1539 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3849 | 3849 |
| |
3850 | 3850 |
| |
3851 | 3851 |
| |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
| 3881 | + | |
| 3882 | + | |
3852 | 3883 |
| |
3853 | 3884 |
| |
3854 | 3885 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
| 24 | + | |
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
| 81 | + | |
| 82 | + | |
81 | 83 |
| |
82 | 84 |
| |
83 | 85 |
| |
|
0 commit comments
Comments
(0)