Re: Large file support?
In article <[🔎] 1028889097.31340.102.camel@linda>,
Oliver Elphick <firstname.lastname@example.org> wrote:
>The question has been raised of large file support in PostgreSQL. This
>would be especially useful for pg_dump, which on a very large database
>could easily write a file larger than 2Gb.
Just open the output file with O_LARGEFILE, so that the output
file can grow over 2 GB.
Alternatively use pg_dump > file, since I/O redirection is done
by the shell, and bash/zsh/etc are compiled with largefile support.
>I've checked the glibc and kernel docs, but I cannot be sure from those
>whether it is safe to turn on large file support for the binary
>packages. Will it work with any kernel? or will it break when run with
>an older kernel?
It will not break with older kernels, but it will only work
with 2.4 kernels.
However compiling with largefile support will change the size
of off_t from 32 bits to 64 bits - if postgres uses off_t or
anything else related to file offsets in a binary struct in one
of the database files you will break stuff pretty heavily. I
would not compile postgres with largefile support until it
is officially supported by the postgres developers.