From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Chris Ruprecht <chrup(at)earthlink(dot)net> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: OS File Size > 1GB |
Date: | 2002-07-25 17:31:49 |
Message-ID: | 19562.1027618309@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Chris Ruprecht <chrup(at)earthlink(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-07-25 18:22:12 | Re: database ownership and dumps |
Previous Message | Nicolas Kowalski | 2002-07-25 17:25:24 | database ownership and dumps |