Re: [HACKERS] Getting total and free disk space from paths in PGDATA

2015-09-08 Thread Kevin Grittner
Michael Paquier wrote: > There is currently no in-core function to query the amount of > available and free space in a path of PGDATA, with something like that > for example: > SELECT * FROM pg_get_diskspace_info('pg_xlog'); > total_space | free_space >

Re: [HACKERS] Getting total and free disk space from paths in PGDATA

2015-09-08 Thread Michael Paquier
On Wed, Sep 9, 2015 at 6:13 AM, Kevin Grittner wrote: > Michael Paquier wrote: > When I was working with Wisconsin Courts we needed something like > this, and wrote it. It has been used on hundreds of clusters, > 24/7, for years. I see that the last publicly posted updated was > in 2008, but it

Re: [HACKERS] Getting total and free disk space from paths in PGDATA

2015-09-08 Thread Michael Paquier
On Mon, Sep 7, 2015 at 11:47 AM, Tom Lane wrote: > Michael Paquier writes: >> statvfs is part of the POSIX spec and is "normally" present on modern >> platforms (BSD, OSX, Linux and Solaris have it as far as I saw, still >> there may be some strange

Re: [HACKERS] Getting total and free disk space from paths in PGDATA

2015-09-06 Thread Tom Lane
Michael Paquier writes: > statvfs is part of the POSIX spec and is "normally" present on modern > platforms (BSD, OSX, Linux and Solaris have it as far as I saw, still > there may be some strange platform without it). There are considerably less strange platforms that