Re: pg_dump large-file support > 16GB

From: Rafael Martinez Guerrero <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump large-file support > 16GB
Date: 2005-03-21 10:16:16
Message-ID: 1111400176.30907.26.camel@bbking.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2005-03-18 at 15:58, Tom Lane wrote:
> Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> writes:
> > On Thu, 2005-03-17 at 10:17 -0500, Tom Lane wrote:
> >> Is that a plain text, tar, or custom dump (-Ft or -Fc)? Is the behavior
> >> different if you just write to stdout instead of using --file?
>
> > - In this example, it is a plain text (--format=3Dp).
> > - If I write to stdout and redirect to a file, the dump finnish without
> > problems and I get a dump-text-file over 16GB without problems.
>
> In that case, you have a glibc or filesystem bug and you should be
> reporting it to Red Hat. The *only* difference between writing to
> stdout and writing to a --file option is that in one case we use
> the preopened "stdout" FILE* and in the other case we do
> fopen(filename, "w"). Your report therefore is stating that there
> is something broken about fopen'd files.
>

Hello again

I have been testing a little more before I open a bug report at RH. I
have a simple test program to test 'fopen' in the samme filesystem I am
having problems. I can not reproduce the problem and the files I produce
with this program can get bigger than 16GB without problems.

Do you use any spesial option when you compile pg_dump, or in the
program that could influence how the program behaves and can help me to
reproduce the problem?

PS.- Be careful with this program ..... it won't stop and will consume
all the free space in your filesystem ;)

----------------------------------------------------------------
-bash-2.05b$ cat test_fopen.c

#include <stdio.h>
#include <unistd.h>

int main(int argc, char **argv){

FILE *fp;
char *filename = argv[1];

char output[1024];
int counter = 0;

if ((fp = fopen(filename,"w")) == NULL){
printf("fopen error\n");
}

while (1){

sprintf(output,"*** Testing the fopen function in a RHEL server -
Counter: %d ***\n",counter);

if (fputs(output,fp) == EOF){
printf("fputs error\n");
}

counter++;
}

fclose(fp);
return 0;
}

-bash-2.05b$ gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 test_fopen.c -o
test_fopen
------------------------------------------------------------------

Thanks :)
--
Rafael Martinez, <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Center for Information Technology Services
University of Oslo, Norway

PGP Public Key: http://folk.uio.no/rafael/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message germ germ 2005-03-21 13:10:46 PHP and Postgres setup
Previous Message Alexander Ivanko 2005-03-21 09:50:10 PostgreSQL v7.4.7 support platform?