Re: WIP - Add ability to constrain backend temporary file space

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: WIP - Add ability to constrain backend temporary file space
Дата
Msg-id 4D5EE9AF.10903@catalyst.net.nz
обсуждение исходный текст
Ответ на Re: WIP - Add ability to constrain backend temporary file space  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: WIP - Add ability to constrain backend temporary file space  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On 19/02/11 10:38, Josh Berkus wrote:
>
>> To answer the other question, what happens when the limit is exceeded is
>> modeled on statement timeout, i.e query is canceled and a message says
>> why (exceeded temp files size).
> When does this happen?  When you try to allocate the file, or when it
> does the original tape sort estimate?
>
> The disadvantage of the former is that the user waited for minutes in
> order to have their query cancelled.  The disadvantage of the latter is
> that the estimate isn't remotely accurate.
>

Neither - it checks each write (I think this is pretty cheap - adds two 
int and double + operations and a  /, > operation to FileWrite). If the 
check shows you've written more than the limit, you get canceled. So you 
can exceed the limit by 1 buffer size.

Yeah, the disadvantage is that (like statement timeout) it is a 'bottom 
of the cliff' type of protection. The advantage is there are no false 
positives...

Cheers

Mark


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues)