forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5232872
committed
Prevent sharing transition states between ordered-set aggregates.
This ought to work, but the built-in OSAs are not capable of coping,because their final-functions destructively modify their transitionstate (specifically, the contained tuplesort object). That was finewhen those functions were written, but commit804163b moved thegoalposts without telling orderedsetaggs.c.We should fix the built-in OSAs to support this, but it will takea little work, especially if we don't want to sacrifice performancein the normal non-shared-state case. Given that it took a year after9.6 release for anyone to notice this bug, we should not prioritizesharable-state over nonsharable-state performance. And a proper fixis likely to be more complicated than we'd want to back-patch, too.Therefore, let's just put in this stop-gap patch to prevent nodeAgg.cfrom choosing to use shared state for OSAs. We can revert it in HEADwhen we get a better fix.Report from Lukas Eder, diagnosis by me, patch by David Rowley.Back-patch to 9.6 where the problem was introduced.Discussion:https://postgr.es/m/CAB4ELO5RZhOamuT9Xsf72ozbenDLLXZKSk07FiSVsuJNZB861A@mail.gmail.com1 parent36b4b91 commit5232872
File tree
3 files changed
+40
-0
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+40
-0
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3808 | 3808 |
| |
3809 | 3809 |
| |
3810 | 3810 |
| |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
| 3820 | + | |
3811 | 3821 |
| |
3812 | 3822 |
| |
3813 | 3823 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1860 | 1860 |
| |
1861 | 1861 |
| |
1862 | 1862 |
| |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
1863 | 1882 |
| |
1864 | 1883 |
| |
1865 | 1884 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
739 | 739 |
| |
740 | 740 |
| |
741 | 741 |
| |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
742 | 753 |
| |
743 | 754 |
| |
744 | 755 |
| |
|
0 commit comments
Comments
(0)