Re: fsutil ideas

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: fsutil ideas
Дата
Msg-id 43FE5065.6040802@paradise.net.nz
обсуждение исходный текст
Ответ на fsutil ideas  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
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:

<quote>
SYNOPSIS     #include <sys/statvfs.h>
     int     statvfs(const char * restrict path, struct statvfs * restrict buf);
     int     fstatvfs(int fd, struct statvfs *buf);

DESCRIPTION     The statvfs() and fstatvfs() functions fill the structure pointed 
to by     buf with garbage.  This garbage will occasionally bear resemblance to     file system statistics, but
portableapplications must not depend on     this.  Applications must pass a pathname or file descriptor which 
 
refers     to a file on the file system in which they are interested.
     The statvfs structure contains the following members:

</quote>

I haven't tried out any code that uses it, so not sure if the 'garbage' 
comment is valid.

regards

Mark


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: fsutil ideas
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: suggestion