Re: Excessive disk usage in WindowAgg

2019-11-04 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> On 2019-11-04 19:04:52 +, Andrew Gierth wrote: >>> Uh, it seems obvious to me that it should be backpatched? >> Fine with me. But I don't think it's just plainly obvious, it's >> essentailly a change in query plans etc, and we've been getting more >> h

Re: Excessive disk usage in WindowAgg

2019-11-04 Thread Tom Lane
Andres Freund writes: > On 2019-11-04 19:04:52 +, Andrew Gierth wrote: >> Uh, it seems obvious to me that it should be backpatched? > Fine with me. But I don't think it's just plainly obvious, it's > essentailly a change in query plans etc, and we've been getting more > hesitant with those ov

Re: Excessive disk usage in WindowAgg

2019-11-04 Thread Andres Freund
Hi, On 2019-11-04 19:04:52 +, Andrew Gierth wrote: > > "Andres" == Andres Freund writes: > > >>> Obviously we _do_ need to be more picky about this; it seems clear > >>> that using CP_SMALL_TLIST | CP_LABEL_TLIST would be a win in many > >>> cases. Opinions? > > >> Seems reasonable

Re: Excessive disk usage in WindowAgg

2019-11-04 Thread Andrew Gierth
> "Andres" == Andres Freund writes: >>> Obviously we _do_ need to be more picky about this; it seems clear >>> that using CP_SMALL_TLIST | CP_LABEL_TLIST would be a win in many >>> cases. Opinions? >> Seems reasonable to me, do you want to do the honors? Andres> I was briefly wondering

Re: Excessive disk usage in WindowAgg

2019-11-04 Thread Andres Freund
Hi, On 2019-11-04 12:18:48 -0500, Tom Lane wrote: > Andrew Gierth writes: > > Using 92MB of disk for one integer seems excessive; the reason is clear > > from the explain: > > ... > > so the whole width of the table is being stored in the tuplestore used > > by the windowagg. > > > In create_win

Re: Excessive disk usage in WindowAgg

2019-11-04 Thread Tom Lane
Andrew Gierth writes: > Using 92MB of disk for one integer seems excessive; the reason is clear > from the explain: > ... > so the whole width of the table is being stored in the tuplestore used > by the windowagg. > In create_windowagg_plan, we have: > /* > * WindowAgg can project, so

Excessive disk usage in WindowAgg

2019-09-24 Thread Andrew Gierth
This one just came up on IRC: create table tltest(a integer, b text, c text, d text); insert into tltest select i, repeat('foo',100), repeat('foo',100), repeat('foo',100) from generate_series(1,10) i; set log_temp_files=0; set client_min_messages=log; select count(a+c) from (select a, c