From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Lukas Eder <lukas(dot)eder(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Subject: | Re: Combination of ordered-set aggregate function terminates JDBC connection on PostgreSQL 9.6.5 |
Date: | 2017-10-14 20:51:32 |
Message-ID: | 20303.1508014292@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
I wrote:
> To know what value of randomAccess to pass to the tuplesort setup,
> we have to know *at the first transition-function call* whether
> there may be multiple final-function calls coming up. So what
> what I'm imagining is a simple boolean result "yes, there will be
> only one finalfn call, so it can destructively modify the transition
> state", or "there might be more than one finalfn call, so the finalfn(s)
> must preserve transition state". And this info has to be available
> throughout the aggregate run.
Attached is a proposed patch to make the ordered-set aggregates
safe for state merging. I've not tested it really thoroughly,
but it passes the regression cases added in 52328727b.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
allow-state-merging-in-builtin-OSAs.patch | text/x-diff | 20.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | andrew | 2017-10-15 12:20:53 | BUG #14855: index-only scans not used in simple cases |
Previous Message | Michael Paquier | 2017-10-14 10:46:12 | Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much |