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