Re: fun fact about temp tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fun fact about temp tables
Дата
Msg-id 16963.1470412247@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fun fact about temp tables  (Grigory Smolkin <g.smolkin@postgrespro.ru>)
Список pgsql-general
Grigory Smolkin <g.smolkin@postgrespro.ru> writes:
> Thank you for your answer.
> But it`s temporary table so it`s equal to saying 'I don`t care about
> this data' and I can get 'out of disk space' regardless of using
> temporary tables.

> What are we winning here?

Sane behavior.  Would you really want this:

    => CREATE TEMP TABLE foo(...);
    CREATE TABLE
    => INSERT INTO foo SELECT lots-o-rows;
    INSERT nnnn
    ... much later ...
    => SELECT * FROM unrelated_temp_table;
    ERROR: out of disk space

If we might suffer out-of-disk-space while flushing a buffer, that's
what we'd risk.  So we allocate the disk space before accepting the
INSERT in the first place.

            regards, tom lane


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

Предыдущее
От: Alex Ignatov
Дата:
Сообщение: Re: fun fact about temp tables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: fun fact about temp tables