log_temp_files confusion - Mailing list pgsql-general

From Filip Rembiałkowski
Subject log_temp_files confusion
Date
Msg-id 92869e661001130651k7bc76013y1e6f58d981ad5134@mail.gmail.com
Whole thread Raw
Responses Re: log_temp_files confusion  (Andrej <andrej.groups@gmail.com>)
List pgsql-general

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 filip@la_filip LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp24899.1", size 162464
2010-01-12 13:24:49 CET 24899 filip@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 filip@la_filip STATEMENT:  Select * From la_foo(31968)

2010-01-12 13:24:49 CET 24899 filip@la_filip LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp24899.0", size 153152
2010-01-12 13:24:49 CET 24899 filip@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 filip@la_filip STATEMENT:  Select * From la_foo(31968)

2010-01-12 13:24:49 CET 24899 filip@la_filip LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp24899.2", size 152128
2010-01-12 13:24:49 CET 24899 filip@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 filip@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:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: R: Re: Weird EXECUTE ... USING behaviour
Next
From: Craig Ringer
Date:
Subject: Re: postgresql 8.1 windows 2008 64 bit