forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit96cfc7e
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 parent0da46d7 commit96cfc7e
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 | |
---|---|---|---|
| |||
3372 | 3372 |
| |
3373 | 3373 |
| |
3374 | 3374 |
| |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
3375 | 3385 |
| |
3376 | 3386 |
| |
3377 | 3387 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1857 | 1857 |
| |
1858 | 1858 |
| |
1859 | 1859 |
| |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
1860 | 1879 |
| |
1861 | 1880 |
| |
1862 | 1881 |
| |
|
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)