Monitoring disk space from within the server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Monitoring disk space from within the server

Christoph Berg-2
Re: Daniel Gustafsson 2019-11-12 <[hidden email]>
> I agree with Tomas upthread that it's unclear whether this needs to be in core.
> There are many system parameters a database admin is likely to be interested
> in, diskspace being just one of them (albeit a very important one for many
> reasons), and there is nothing that makes the SQL interface (or postgres core
> for that matter) particularly more suited for this job than other existing
> tools.
>
> Why is SQL level crucial for this?

Because the figure is interesting to users as well. They will usually
not have any access to monitoring, and checking if they can load this
extra 10 GB dataset is a good use case.

This is about providing the numbers in the place where they are
needed. Of course admins can just go elsewhere to look it up (and
probably will), but I think now there's a usability gap for people who
just have SQL access.

Christoph


Reply | Threaded
Open this post in threaded view
|

Re: Monitoring disk space from within the server

Julien Rouhaud
In reply to this post by Michael Paquier-2
On Tue, Nov 12, 2019 at 2:48 AM Michael Paquier <[hidden email]> wrote:
>
> On Mon, Nov 11, 2019 at 09:11:35PM +0100, Laurenz Albe wrote:
> > Will this work on Windows?
> > A quick web search seems to indicate that Windows has no statfs(2).
>
> It won't.  We are actually discussing the compatibility aspects and
> the minimal data set we could grab in a different part of the thread.

For the record I already mentioned Windows specificity in [1] and
GetDiskFreeSpaceA [2] looks like the function to use on windows.

[1] https://www.postgresql.org/message-id/CAOBaU_Zu6RP6-mHyA_J9-xkxJe0tarTVqU9TFza%2BtCPKUxsjiA%40mail.gmail.com
[2] https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespacea


12