Re: Re: patch review : Add ability to constrain backend temporary file space - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: Re: patch review : Add ability to constrain backend temporary file space
Date
Msg-id 4DE6FAE2.9060608@catalyst.net.nz
Whole thread Raw
In response to Re: patch review : Add ability to constrain backend temporary file space  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
List pgsql-hackers
On 02/06/11 11:35, Mark Kirkwood wrote:
> On 01/06/11 09:24, Cédric Villemain wrote: Simple Feature test
>> ==============
>>
>> either explain buffers is wrong or the patch is wrong:
>> cedric=# explain (analyze,buffers) select * from foo  order by 1 desc ;
>>                                                     QUERY PLAN
>> -----------------------------------------------------------------------------------------------------------------
>>
>>   Sort  (cost=10260.02..10495.82 rows=94320 width=4) (actual
>> time=364.373..518.940 rows=100000 loops=1)
>>     Sort Key: generate_series
>>     Sort Method: external merge  Disk: 1352kB
>>     Buffers: local hit=393, temp read=249 written=249
>>     ->   Seq Scan on foo  (cost=0.00..1336.20 rows=94320 width=4)
>> (actual time=0.025..138.754 rows=100000 loops=1)
>>           Buffers: local hit=393
>>   Total runtime: 642.874 ms
>> (7 rows)
>>
>> cedric=# set max_temp_files_size to 1900;
>> SET
>> cedric=# explain (analyze,buffers) select * from foo  order by 1 desc ;
>> ERROR:  aborting due to exceeding max temp files size
>> STATEMENT:  explain (analyze,buffers) select * from foo  order by 1
>> desc ;
>> ERROR:  aborting due to exceeding max temp files size
>>
>> Do you have some testing method I can apply to track that without
>> explain (analyze, buffers) before going to low-level monitoring ?
>>
>
> We're looking at this...
>

Arg - I was being dense. FileWrite can write *anywhere* in the file, so
need to be smart about whether to add to the total filesize or not.

I'll update the Commitfest page as soon as it sends me my password reset
mail...

Cheers

Mark


Attachment

pgsql-hackers by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: pg_terminate_backend and pg_cancel_backend by not administrator user
Next
From: Noah Misch
Date:
Subject: Re: pg_terminate_backend and pg_cancel_backend by not administrator user