Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 99C07475CE9 for ; Thu, 25 Jul 2002 13:31:51 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g6PHVnVk019563; Thu, 25 Jul 2002 13:31:49 -0400 (EDT) To: Chris Ruprecht Cc: pgsql-admin@postgresql.org Subject: Re: OS File Size > 1GB In-reply-to: <200207251250.30219.chrup@earthlink.net> References: <200207251250.30219.chrup@earthlink.net> Comments: In-reply-to Chris Ruprecht message dated "Thu, 25 Jul 2002 12:50:30 -0400" Date: Thu, 25 Jul 2002 13:31:49 -0400 Message-ID: <19562.1027618309@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200207/362 X-Sequence-Number: 5046 Chris Ruprecht writes: > The default size of a Postgres file seems to be 1 GB. I know, I can increase > that by modifying which gives you the file size, once you divide it by the blocksize> > My question is: is it safe to do so? Yes, *if* your OS supports large files. It might fail at 2GB, and definitely will fail beyond 4GB, because we use 32-bit arithmetic to compute file offsets. You could possibly fix this with some fairly localized hacking in fd.c, which AFAIK is pretty much the only place that actually deals in byte offsets rather than block numbers. If you were to make that code talk to a 64-bit-offset fseek call, you could probably disable segment splitting entirely (look in md.c to see the #ifdef for that). If you try this, let us know how it works. That code hasn't been touched recently, but I think it would be cool if there were a compile option for 64-bit file offsets in place of segment splitting. regards, tom lane