Kevin Grittner wrote:
> So, my questions:
> (1) Did I miss something regarding mingw support for statvfs?
> (2) If not, is it acceptable for a source file to contain that much
> #if code for Windows?
> I should probably also ask a tertiary question. His implementation
> reports space in 1K increments though int values. This effectively
> limits the maximum space which will be handled to 2 TB, which I'm told
> would be enough to cover our organization for the next ten years, but I
> suspect that the PostgreSQL community would prefer to see this handled a
> different way.
> (3) What data type should be used to report total space and free space
> for each volume?
> Thanks in advance for your responses.
No really answering your questions, but (if you haven't already) you
might want to consider creating a view that extracts all the interesting
stuff from the file_system() function - so that potential users can just
'\d' it to determine what it provides.
Also, not sure if its really important, but the man entry from statvfs
on FreeBSD is a little disconcerting:
statvfs(const char * restrict path, struct statvfs * restrict buf);
fstatvfs(int fd, struct statvfs *buf);
The statvfs() and fstatvfs() functions fill the structure pointed
buf with garbage. This garbage will occasionally bear resemblance to
file system statistics, but portable applications must not depend on
this. Applications must pass a pathname or file descriptor which
to a file on the file system in which they are interested.
The statvfs structure contains the following members:
I haven't tried out any code that uses it, so not sure if the 'garbage'
comment is valid.
In response to
pgsql-hackers by date
|Next:||From: Andrew Dunstan||Date: 2006-02-24 01:44:57|
|Subject: Re: suggestion|
|Previous:||From: Andrew Dunstan||Date: 2006-02-24 00:14:20|
|Subject: Re: fsutil ideas|