I would like to log usage of temporary files for sort/join operations, but
only when size of these files exceeds some threshold.
So I set in postgresql.conf (this is 8.4.2)
log_temp_files = 4MB
But then I got these messages in log file
2010-01-12 13:24:49 CET 24899 fi...@la_filip LOG: temporary file: path
"base/pgsql_tmp/pgsql_tmp24899.1", size 162464
2010-01-12 13:24:49 CET 24899 fi...@la_filip CONTEXT: SQL statement "insert
into foo ( ... ) select ...
PL/pgSQL function "la_foo" line 51 at SQL statement
2010-01-12 13:24:49 CET 24899 fi...@la_filip STATEMENT: Select * From
la_foo(31968)
2010-01-12 13:24:49 CET 24899 fi...@la_filip LOG: temporary file: path
"base/pgsql_tmp/pgsql_tmp24899.0", size 153152
2010-01-12 13:24:49 CET 24899 fi...@la_filip CONTEXT: SQL statement "insert
into foo ( ... ) select ...
PL/pgSQL function "la_foo" line 51 at SQL statement
2010-01-12 13:24:49 CET 24899 fi...@la_filip STATEMENT: Select * From
la_foo(31968)
2010-01-12 13:24:49 CET 24899 fi...@la_filip LOG: temporary file: path
"base/pgsql_tmp/pgsql_tmp24899.2", size 152128
2010-01-12 13:24:49 CET 24899 fi...@la_filip CONTEXT: SQL statement "insert
into foo ( ... ) select ...
PL/pgSQL function "la_foo" line 51 at SQL statement
2010-01-12 13:24:49 CET 24899 fi...@la_filip STATEMENT: Select * From
la_foo(31968)
The combined size of temporary files named in these three warnings is far
from 4 MB.
Why is postgres logging these operations?
How is this threshold calculated at run time?
TIA
--
Filip Rembiałkowski
JID,mailto:[email protected]
http://filip.rembialkowski.net/