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
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to