Monitoring disk space from within the server

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема Monitoring disk space from within the server
Дата
Msg-id 20191108132419.GG8017@msg.df7cb.de
обсуждение исходный текст
Ответы Re: Monitoring disk space from within the server  (Julien Rouhaud <rjuju123@gmail.com>)
Re: Monitoring disk space from within the server  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: Monitoring disk space from within the server  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-hackers
Monitoring the available disk space is the topmost thing on the
priority for PostgreSQL operation, yet this metric is not available
from the SQL level.

The attached patch implements a function pg_tablespace_statfs(tblspc)
to report disk space numbers per tablespace:

# select * from pg_tablespace_statfs('pg_default');
  blocks   │  bfree   │  bavail  │  files   │  ffree
───────────┼──────────┼──────────┼──────────┼──────────
 103179564 │ 20829222 │ 20815126 │ 26214400 │ 24426295

Open points:
* should these numbers be converted to bytes?
* the column names currently mirror the statfs() names and should
  certainly be improved
* which of these columns add to \db+ output?
* possibly extend this (and \db) to pg_wal

Christoph

Вложения

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

Предыдущее
От: Grigory Smolkin
Дата:
Сообщение: Re: [proposal] recovery_target "latest"
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: Why overhead of SPI is so large?