Re: log_duration - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: log_duration
Date
Msg-id 200302130307.h1D374G20228@candle.pha.pa.us
Whole thread Raw
In response to Re: log_duration  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: log_duration
List pgsql-hackers
Well, part of the issue here is that it isn't always bad to use sort
file;  certainly it is better to use them than to swap.

We have a checkpoint_warning in 7.4 that will warn about excessive
checkpointing.  What would our criteria be for warning about sort_mem? 
Seems we would have to know how much free memory there is available, and
in fact, if there is lots of free memory, the sort files will just sit
in the kernel disk cache anyway.

I am not saying this is a bad idea --- we just need to define it clearer.

---------------------------------------------------------------------------

Christopher Kings-Lynne wrote:
> > Someone asked about this at FOSDEM. The only way I know to do it is look
> > in the pgsql_temp directory, but they disappear pretty quickly.  Folks,
> > do we need something to report sort file usage?
> 
> How about a new GUC variable: log_sort_tempfiles
> 
> And in the code that creates the temp file, if the GUC variable is true,
> then do:
> 
> elog(LOG, "Sort needed temp file.  Sort required 2456K.  Try increasing
> sort_mem.");
> 
> Or something?
> 
> Chris
> 
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: "J. M. Brenner"
Date:
Subject: Re: location of the configuration files
Next
From: "Christopher Kings-Lynne"
Date:
Subject: horology and time failures on freebsd/alpha