From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila(at)enterprisedb(dot)com> |
Subject: | Re: Combining Aggregates |
Date: | 2016-01-22 20:17:05 |
Message-ID: | CAMkU=1xeW_TLzg3YPVA7mnOp4tg3uKrR8BrUh4oMXxK3a+9PKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 20, 2016 at 11:06 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Jan 20, 2016 at 7:38 AM, David Rowley
> <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
>> Agreed. So I've attached a version of the patch which does not have any of
>> the serialise/deserialise stuff in it.
>
> I re-reviewed this and have committed most of it with only minor
> kibitizing. A few notes:
This commit has broken pg_dump. At least, I think this is the thread
referencing this commit:
commit a7de3dc5c346e07e0439275982569996e645b3c2
Author: Robert Haas <rhaas(at)postgresql(dot)org>
Date: Wed Jan 20 13:46:50 2016 -0500
Support multi-stage aggregation.
If I add an aggregate to an otherwise empty 9.4.5 database:
CREATE OR REPLACE FUNCTION first_agg ( anyelement, anyelement )
RETURNS anyelement LANGUAGE sql IMMUTABLE STRICT AS $$
SELECT $1;
$$;
-- And then wrap an aggregate around it
-- aggregates do not support create or replace, alas.
CREATE AGGREGATE first (
sfunc = first_agg,
basetype = anyelement,
stype = anyelement
);
And then run pg_dump from 9.6.this on it, I get:
pg_dump: column number -1 is out of range 0..17
Segmentation fault (core dumped)
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000416b0b in dumpAgg (fout=0x1e551e0, agginfo=0x1e65ec0)
at pg_dump.c:12670
12670 if (strcmp(aggcombinefn, "-") != 0)
(gdb) bt
#0 0x0000000000416b0b in dumpAgg (fout=0x1e551e0, agginfo=0x1e65ec0)
at pg_dump.c:12670
#1 0x000000000041df7a in main (argc=<value optimized out>,
argv=<value optimized out>) at pg_dump.c:810
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2016-01-22 20:42:40 | Re: Performance improvement for joins where outer side is unique |
Previous Message | Julien Rouhaud | 2016-01-22 20:01:46 | Re: GIN pending list clean up exposure to SQL |