Re: fun fact about temp tables

Поиск
Список
Период
Сортировка
Искать
От
Alex Ignatov
Тема
Re: fun fact about temp tables
Дата
Msg-id
5a4e7bde-28ad-0315-7d74-13d879b0fb56@postgrespro.ru
Ответ на
Список
Дерево обсуждения
fun fact about temp tables Grigory Smolkin <g.smolkin@postgrespro.ru>
Re: fun fact about temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: fun fact about temp tables Grigory Smolkin <g.smolkin@postgrespro.ru>
Re: fun fact about temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: fun fact about temp tables Andrew Sullivan <ajs@crankycanuck.ca>
Re: fun fact about temp tables Grigory Smolkin <g.smolkin@postgrespro.ru>
Re: fun fact about temp tables Alex Ignatov <a.ignatov@postgrespro.ru>
Re: fun fact about temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: fun fact about temp tables Alex Ignatov <a.ignatov@postgrespro.ru>
Re: fun fact about temp tables Grigory Smolkin <g.smolkin@postgrespro.ru>

On 05.08.2016 17:51, Tom Lane wrote:
> Grigory Smolkin  writes:
>> I`ve noticed interesting aspect in temp tables working. It appears
>> postgres is trying to reserve space on disk for temp tables even before
>> temp_buffers overflow.
> Sure.  Just like it reserves space for ordinary tables right away,
> long before there's any need to push the data out of shared_buffers.
> Otherwise, you might find yourself having to throw an "out of disk
> space" error after having already committed the relevant INSERTs.
>
> 			regards, tom lane
>
>
How about out of space when we filling WAL files? Just rollback and 
nothing else. We can fall in this with space reservation for WAL files.

In this situation with temp table we reserved space long before we ever 
need it if we have size of temp table < temp_buffer.
  Why not just rollback transaction in "Out of space" situation? With 
this preliminary reservation we use HDD resource but in fact we dont 
need it.
In situation with high rate creation of temp table, we saturate HDD 
resource with "just in case" reservation.

Have we any other explanation except "out of space" problem? May be 
there is some fundamental things tied with that?

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


В списке pgsql-general по дате отправления
От: Grigory Smolkin
Дата:
Сообщение: Re: fun fact about temp tables
От: Tom Lane
Дата:
Сообщение: Re: fun fact about temp tables
FAQ