Re: log_temp_files (integer), tuning work_mem - Mailing list pgsql-performance

From Guillaume Lelarge
Subject Re: log_temp_files (integer), tuning work_mem
Date
Msg-id CAECtzeXo3CuCwL+DWnAi9L72PGW1EqKQRQGQcPo4dXkEUDyW4w@mail.gmail.com
Whole thread Raw
In response to log_temp_files (integer), tuning work_mem  (Tory M Blue <tmblue@gmail.com>)
List pgsql-performance

Hi,

Le 5 nov. 2014 22:34, "Tory M Blue" <tmblue@gmail.com> a écrit :
>
> log_temp_files (integer)
> Controls logging of temporary file names and sizes. Temporary files can be created for sorts, hashes, and temporary query results. A log entry is made for each temporary file when it is deleted. A value of zero logs all temporary file information
>
> so I've set this to;
>
> log_temp_files = 0                      # log temporary files equal or larger
>
> Reloaded the config and still have not seen a creation or deletion of a log file. Is this still valid in 9.3 and do I need to change anything else?
>

Still works (though only shows creation, not deletion).

> I've got duration queries spitting out;
>
> 2014-11-05 12:11:32 PST rvtempdb postgres [local] 31338 2014-11-05 12:11:32.257 PSTLOG:  duration: 1609.707 ms  statement: COPY adgroups (adgroup_id, name, status, campaign_id, create_date, modify_date) FROM stdin;
>
> So logging is working.
>
> I'm set to info ;
>
> log_min_messages = info   
>
> So what would be the cause of not seeing anything ,and how can one turn work_mem without seeing these entries?
>

My best guess would be your queries are happy enough with your current work_mem setting.

With the default value, an easy enough example that shows such a message is:

create table t1(id integer);
insert into t1 select generate_series (1,1000000);
select * from t1 order by id;

With the last query, you should get a temporary file log message in your log file.

pgsql-performance by date:

Previous
From: Artūras Lapinskas
Date:
Subject: Index order ignored after `is null` in query
Next
From: Artūras Lapinskas
Date:
Subject: Re: Index order ignored after `is null` in query