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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: patch review : Add ability to constrain backend temporary file space
Дата
Msg-id 525.1310872071@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: patch review : Add ability to constrain backend temporary file space  (Tatsuo Ishii <ishii@postgresql.org>)
Ответы Re: Re: patch review : Add ability to constrain backend temporary file space  (Tatsuo Ishii <ishii@postgresql.org>)
Список pgsql-hackers
Tatsuo Ishii <ishii@postgresql.org> writes:
>> Remember that what will happens is probably:
>> 
>> ERROR:  aborting due to exceeding temp file limit. Current usage 8000kB,
>> requested size 8008kB, thus it will exceed temp file limit 8kB.

> Could you please elaborate why "Current usage 8000kB" can bigger than
> "temp file limit 8kB"? I undertstand the point that temp files are
> allocated by 8kB at once, but I don't understand why those numbers you
> suggested could happen. Actually I tried with the modified patches and
> got:

> test=# CREATE TEMPORARY TABLE resourcetemp1 AS SELECT generate_series(1,100000);
> SELECT 100000
> test=# SET temp_file_limit = 578;
> SET
> test=# SELECT count(*) FROM (select * FROM resourcetemp1  ORDER BY 1) AS a;
> ERROR:  aborting due to exceeding temp file limit, current usage 576kB, requested size 8192kB, thus it will exceed
tempfile limit 578kB
 

You didn't show us how you computed those numbers, but I'm really
dubious that FileWrite() has got any ability to produce numbers that
are helpful.  Like Cedric, I think the write amount in any one call
is usually going to be one block.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: patch review : Add ability to constrain backend temporary file space
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Is there a committer in the house?