From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Ruprecht <chrup@earthlink.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: OS File Size > 1GB
Date: Thu, 25 Jul 2002 13:31:49 -0400
Message-ID: <19562.1027618309@sss.pgh.pa.us> (raw)
In-Reply-To: <200207251250.30219.chrup@earthlink.net>
References: <200207251250.30219.chrup@earthlink.net>
Chris Ruprecht <chrup@earthlink.net> writes:
> The default size of a Postgres file seems to be 1 GB. I know, I can increase
> that by modifying <can't remember what it was I did here - that parameter
> 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
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: tgl@sss.pgh.pa.us, chrup@earthlink.net
Subject: Re: OS File Size > 1GB
In-Reply-To: <19562.1027618309@sss.pgh.pa.us>
References: <200207251250.30219.chrup@earthlink.net> <19562.1027618309@sss.pgh.pa.us>
* 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