Re: log_duration

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: log_duration
Дата
Msg-id 87ptpwlud8.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на Re: log_duration  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
> 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Brain dump: btree collapsing
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Brain dump: btree collapsing