From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Christoph Berg <myon(at)debian(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Monitoring disk space from within the server |
Date: | 2019-11-08 13:48:58 |
Message-ID: | CAOBaU_Zu6RP6-mHyA_J9-xkxJe0tarTVqU9TFza+tCPKUxsjiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 8, 2019 at 2:35 PM Christoph Berg <myon(at)debian(dot)org> wrote:
>
> Re: Julien Rouhaud 2019-11-08 <CAOBaU_YVGEnsnP1ufp42NiJ+WvPHRWBOsBOcaxWxsbXPN_sdNQ(at)mail(dot)gmail(dot)com>
> > Shouldn't we have something more generic, in hope that this eventually
> > get implemented on Windows? I'm also wondering if getting the fs
> > information is enough, as there might be quota.
>
> The name is certainly not a good pick, it's not meant to be a raw
> statfs() wrapper but something more high-level. I just went with that
> to have something working to start with.
>
> How about these?
> pg_tablespace_stats()
> pg_tablespace_space()
> pg_tablespace_disk_space()
The related function on Windows is apparently GetDiskFreeSpaceA [1].
It'll probably be quite hard to get something consistent for most of
counters, so probably pg_tablespace_(disk_)space is the best name,
providing only total size and free size?
[1] https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespacea
From | Date | Subject | |
---|---|---|---|
Next Message | Rafia Sabih | 2019-11-08 13:52:12 | Performance improvement for queries with IN clause |
Previous Message | Christoph Berg | 2019-11-08 13:40:13 | Re: Monitoring disk space from within the server |