Search Postgresql Archives

Re: fun fact about temp tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Grigory Smolkin <g.smolkin@xxxxxxxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux