Re: Monitoring disk space from within the server

Поиск
Список
Период
Сортировка
Искать
От
Laurenz Albe
Тема
Re: Monitoring disk space from within the server
Дата
Msg-id
9d7165a201fe3ce3a00755b4474bb618b3ddba5e.camel@cybertec.at
Ответ на
Список
Дерево обсуждения
Monitoring disk space from within the server Christoph Berg <myon@debian.org>
Re: Monitoring disk space from within the server Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Monitoring disk space from within the server Christoph Berg <myon@debian.org>
Re: Monitoring disk space from within the server Christoph Berg <myon@debian.org>
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>
Re: Monitoring disk space from within the server Michael Paquier <michael@paquier.xyz>
Re: Monitoring disk space from within the server Julien Rouhaud <rjuju123@gmail.com>
Re: Monitoring disk space from within the server Julien Rouhaud <rjuju123@gmail.com>
Re: Monitoring disk space from within the server Christoph Berg <myon@debian.org>
Re: Monitoring disk space from within the server Julien Rouhaud <rjuju123@gmail.com>
Re: Monitoring disk space from within the server Christoph Berg <myon@debian.org>
Re: Monitoring disk space from within the server Julien Rouhaud <rjuju123@gmail.com>
Re: Monitoring disk space from within the server Michael Paquier <michael@paquier.xyz>
Re: Monitoring disk space from within the server Christoph Moench-Tegeder <cmt@burggraben.net>
Re: Monitoring disk space from within the server Michael Paquier <michael@paquier.xyz>
Re: Monitoring disk space from within the server Daniel Gustafsson <daniel@yesql.se>
Re: Monitoring disk space from within the server Michael Paquier <michael@paquier.xyz>
Re: Monitoring disk space from within the server Christoph Berg <myon@debian.org>
Re: Monitoring disk space from within the server Christoph Berg <myon@debian.org>
Re: Monitoring disk space from within the server Julien Rouhaud <rjuju123@gmail.com>
Re: Monitoring disk space from within the server Christoph Berg <myon@debian.org>
On Fri, 2019-11-08 at 14:24 +0100, Christoph Berg wrote:
> 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

Will this work on Windows?
A quick web search seems to indicate that Windows has no statfs(2).

What's more is that the Linux man page says that statfs(2) is
Linux-specific.

I think that if we have such a feature (which I think would be useful)
should be available for all operating systems supported by PostgreSQL.

Yours,
Laurenz Albe



В списке pgsql-hackers по дате отправления
От: Laurenz Albe
Дата:
От: Paul A Jungwirth
Дата:
FAQ