[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-performance
Subject:    Re: [PERFORM] log_temp_files (integer), tuning work_mem
From:       Guillaume Lelarge <guillaume () lelarge ! info>
Date:       2014-11-06 6:31:56
Message-ID: CAECtzeXo3CuCwL+DWnAi9L72PGW1EqKQRQGQcPo4dXkEUDyW4w () mail ! gmail ! com
[Download RAW message or body]

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.

[Attachment #3 (text/html)]

<p dir="ltr">Hi,</p>
<p dir="ltr">Le 5 nov. 2014 22:34, &quot;Tory M Blue&quot; &lt;<a \
href="mailto:tmblue@gmail.com">tmblue@gmail.com</a>&gt; a écrit :<br> &gt;<br>
&gt; log_temp_files (integer)<br>
&gt; 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<br> &gt;<br>
&gt; so I&#39;ve set this to;<br>
&gt;<br>
&gt; log_temp_files = 0                                 # log temporary files equal \
or larger<br> &gt;<br>
&gt; 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?<br> &gt;</p>
<p dir="ltr">Still works (though only shows creation, not deletion).</p>
<p dir="ltr">&gt; I&#39;ve got duration queries spitting out;<br>
&gt;<br>
&gt; 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;<br> &gt;<br>
&gt; So logging is working.<br>
&gt;<br>
&gt; I&#39;m set to info ;<br>
&gt;<br>
&gt; log_min_messages = info     <br>
&gt;<br>
&gt; So what would be the cause of not seeing anything ,and how can one turn work_mem \
without seeing these entries?<br> &gt;</p>
<p dir="ltr">My best guess would be your queries are happy enough with your current \
work_mem setting.</p> <p dir="ltr">With the default value, an easy enough example \
that shows such a message is:</p> <p dir="ltr">create table t1(id integer);<br>
insert into t1 select generate_series (1,1000000);<br>
select * from t1 order by id;</p>
<p dir="ltr">With the last query, you should get a temporary file log message in your \
log file.</p>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic