In article <[EMAIL PROTECTED]>,
Partho Bhowmick <[EMAIL PROTECTED]> wrote:
-I am working on extending the functionality of PostgreSQL on Linux.
-I need to know what's the largest filesize for a single file that I can have
-under Linux?

The answer is definitive: it depends...

There are multiple layers that have file size restrictions (from bottom to top):

* The filesystem itself on the disk.
* The Virtual File System implementation in the kernel.
* The filesystem library interface.
* The application.

The max file size is the minimum of the allowable file sizes for each 
component. Generally there are two available sizes:

* 2.1GB imposed by a +/- 31 bit file offset. Until recently the VFS, library,
  and applications imposed this limit.
* 9 million TB imposed by a +/- 63 bit file offset. Most recent distributions
  have all 4 elements implementing this filesize.

Here's a simple test. On a filesystem with more than 5GB available try the
following:

# dd if=/dev/zero of=testfilesize bs=1024K count=3000

This will attempt to create a 3GB file which exceeds the 2.1GB max imposed by
31 bit offsets. If the file creation is successful, you can pretty much
create a file of any size.

BAJ

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to