Re: Re: patch review : Add ability to constrain backend temporary file space

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: patch review : Add ability to constrain backend temporary file space
Date: 2011-06-02 02:52:18
Message-ID: 4DE6FAE2.9060608@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
temp-files-v4.patch.gz application/x-gzip 2.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2011-06-02 04:59:55 Re: pg_terminate_backend and pg_cancel_backend by not administrator user
Previous Message Josh Kupershmidt 2011-06-02 02:26:34 Re: pg_terminate_backend and pg_cancel_backend by not administrator user