On Fri, Dec 8, 2017 at 6:19 PM, Bernd Helmle <mailings@oopsware.de> wrote:
> valgrind --leak-check=no --gen-suppressions=all \
> --track-origins=yes --suppressions=src/tools/valgrind.supp \
> --time-stamp=yes --trace-children=yes postgres
I have been trying for a couple of hours to reproduce a failure using
views with grouping sets, enforcing an external sort with things like
that:zfAgg
create table aa (a1 int, a2 int, a3 int, a4 int, a5 int, a6 int);
insert into aa SELECT (random() * 2000000000)::int,
(random() * 2000000000)::int,
(random() * 2000000000)::int,
(random() * 2000000000)::int,
(random() * 2000000000)::int,
(random() * 2000000000)::int FROM generate_series(1,1000000);
set work_mem = '128kB';
create or replace view aav as SELECT a1, a2, a3, a4, a5, avg(a6)
FROM aa GROUP BY GROUPING SETS (a1, a2, a3, a4, a5);
explain analyze select * from aav order by a1, a2, a3, a4, a5;
Not sure if you can provide this information, but what does the plan
of the query look like?
--
Michael