> 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?
Fwiw here's the perl one-liner I used to tune sort_mem recently, (run in the $PGDATA/base directory): perl -e 'while (sleep(1)) {if ($s = -s <pgsql_tmp/*>) { if ($s > $m) { $m = $s; print "$s\n"; } } }' When doing this I had precisely the same thought about having Postgres print out the disk space usage for sorts. -- greg ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster