pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: byron@cc.gatech.edu
To: pgsql-hackers@postgresql.org
To: pgsql-admin@postgresql.org
To: pgsql-general@postgresql.org
Subject: Re: Largest filesize under Linux
Date: 11 Mar 2003 13:41:31 -0500
Message-ID: <b4lakr$pd3@cleon.cc.gatech.edu> (raw)
References: <e4pba.794$yy2.89177201@newssvr13.news.prodigy.com>

In article <e4pba.794$yy2.89177201@newssvr13.news.prodigy.com>,
Partho Bhowmick <pbhowmick@sbcglobal.net> 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



view thread (7+ messages)  latest in thread

Message-ID: <b4lakr$pd3@cleon.cc.gatech.edu>
Permalink:  ../b4lakr$pd3@cleon.cc.gatech.edu/
Also on:    postgresql.org/message-id/b4lakr$pd3@cleon.cc.gatech.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: byron@cc.gatech.edu, pgsql-hackers@postgresql.org, pgsql-general@postgresql.org
  Subject: Re: Largest filesize under Linux
  In-Reply-To: <b4lakr$pd3@cleon.cc.gatech.edu>
  References: <e4pba.794$yy2.89177201@newssvr13.news.prodigy.com> <b4lakr$pd3@cleon.cc.gatech.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox