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

Amit Kapila
Avoid unconditionally filling in missing values with NULL in pgoutput.
52e4f0c introduced a bug in pgoutput in which missing values in tupleswere incorrectly filled in with NULL. The problem was the use ofCreateTupleDescCopy where CreateTupleDescCopyConstr was required, as theformer drops the constraints in the tuple description (specifically, thedefault value constraint) on the floor.The bug could result in incorrectness when a table replicated via`REPLICA IDENTITY FULL` underwent a schema change that added a columnwith a default value. The problem is that in such cases updates fill NULLvalues in old tuples for missing columns for default values. Then on thesubscriber, we failed to find a matching tuple and missed updating therequired row.Author: Nikhil BeneschReviewed-by: Hou Zhijie, Amit KapilaBackpatch-through: 15Discussion:http://postgr.es/m/CAPWqQZTEpZQamYsGMn6ZDRvVywwpVPiKH6OY4KSgA+NmeqFNzA@mail.gmail.com1 parentdc9f8a7 commit360392f
File tree
2 files changed
+55
-2
lines changed- src
- backend/replication/pgoutput
- test/subscription/t
2 files changed
+55
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1136 | 1136 |
| |
1137 | 1137 |
| |
1138 | 1138 |
| |
1139 |
| - | |
1140 |
| - | |
| 1139 | + | |
| 1140 | + | |
1141 | 1141 |
| |
1142 | 1142 |
| |
1143 | 1143 |
| |
|
Lines changed: 53 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
438 | 438 |
| |
439 | 439 |
| |
440 | 440 |
| |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
441 | 494 |
|
0 commit comments
Comments
(0)