forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit171e041
committed
Fix heap_getattr() handling of fast defaults.
Previously heap_getattr() returned NULL for attributes with a fastdefault value (c.f.16828d5), as it had no handling whatsoeverfor that case.A previous fix,7636e5c, attempted to fix issues caused by thisoversight, but just expanding OLD tuples for triggers doesn't actuallysolve the underlying issue.One known consequence of this bug is that the check for HOT updatescan return the wrong result, when a previously fast-default'ed columnis set to NULL. Which in turn means that an index over a column withfast default'ed columns might be corrupt if the underlying column(s)allow NULLs.Fix by handling fast default columns in heap_getattr(), remove nowsuperfluous expansion in GetTupleForTrigger().Author: Andres FreundDiscussion:https://postgr.es/m/20190201162404.onngi77f26baem4g@alap3.anarazel.deBackpatch: 11, where fast defaults were introduced1 parentd07fb68 commit171e041
File tree
5 files changed
+52
-11
lines changed- src
- backend
- access/common
- commands
- include/access
- test/regress
- expected
- sql
5 files changed
+52
-11
lines changedLines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
74 |
| - | |
75 |
| - | |
76 | 74 |
| |
77 | 75 |
| |
78 | 76 |
| |
| |||
82 | 80 |
| |
83 | 81 |
| |
84 | 82 |
| |
85 |
| - | |
| 83 | + | |
86 | 84 |
| |
87 | 85 |
| |
88 | 86 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3412 | 3412 |
| |
3413 | 3413 |
| |
3414 | 3414 |
| |
3415 |
| - | |
3416 |
| - | |
3417 |
| - | |
3418 |
| - | |
| 3415 | + | |
3419 | 3416 |
| |
3420 | 3417 |
| |
3421 | 3418 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
764 | 764 |
| |
765 | 765 |
| |
766 | 766 |
| |
767 |
| - | |
768 |
| - | |
769 |
| - | |
770 |
| - | |
| 767 | + | |
771 | 768 |
| |
772 | 769 |
| |
773 | 770 |
| |
| |||
788 | 785 |
| |
789 | 786 |
| |
790 | 787 |
| |
| 788 | + | |
| 789 | + | |
791 | 790 |
| |
792 | 791 |
| |
793 | 792 |
| |
|
Lines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
770 | 770 |
| |
771 | 771 |
| |
772 | 772 |
| |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
773 | 800 |
| |
774 | 801 |
| |
775 | 802 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
508 | 528 |
| |
509 | 529 |
| |
510 | 530 |
| |
|
0 commit comments
Comments
(0)