X-Original-To: pgsql-admin@postgresql.org Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 9084247601F; Tue, 11 Mar 2003 13:55:08 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 48C8D43A611; Tue, 11 Mar 2003 13:55:08 -0500 (EST) From: byron@cc.gatech.edu (Byron A Jeff) X-Newsgroups: alt.os.linux, comp.databases.postgresql.admin, comp.databases.postgresql.general, comp.databases.postgresql.hackers, comp.os.linux.development.system Subject: Re: Largest filesize under Linux Date: 11 Mar 2003 13:41:31 -0500 Organization: College of Computing, Georgia Tech Lines: 33 Message-ID: References: To: pgsql-hackers@postgresql.org, pgsql-admin@postgresql.org, pgsql-general@postgresql.org X-Archive-Number: 200303/143 X-Sequence-Number: 7783 In article , Partho Bhowmick 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