Re: pg_restore and large files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Charnoky <noky(at)nextbus(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_restore and large files
Date: 2004-02-05 19:15:53
Message-ID: 5528.1076008553@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Charnoky <noky(at)nextbus(dot)com> writes:
> So, it does look like a pg_restore bug and that dataPos is
> being treated as an integer somewhere.

After digging in the CVS log I bet this is the same bug just noted a
month ago:

2004-01-03 23:02 tgl

* src/bin/pg_dump/: pg_backup_archiver.c (REL7_4_STABLE),
pg_backup_archiver.c: Fix ReadOffset() to work correctly when off_t
is wider than int.

It looks like the same patch applies to 7.3, modulo slightly different
line number. Please try it and let us know if it fixes the problem.

regards, tom lane

===================================================================
RCS file: /cvsroot//pgsql-server/src/bin/pg_dump/pg_backup_archiver.c,v
retrieving revision 1.79
retrieving revision 1.79.2.1
diff -c -r1.79 -r1.79.2.1
*** pgsql-server/src/bin/pg_dump/pg_backup_archiver.c 2003/10/20 21:05:11 1.79
--- pgsql-server/src/bin/pg_dump/pg_backup_archiver.c 2004/01/04 04:02:22 1.79.2.1
***************
*** 1425,1431 ****
for (off = 0; off < AH->offSize; off++)
{
if (off < sizeof(off_t))
! *o |= ((*AH->ReadBytePtr) (AH)) << (off * 8);
else
{
if ((*AH->ReadBytePtr) (AH) != 0)
--- 1425,1431 ----
for (off = 0; off < AH->offSize; off++)
{
if (off < sizeof(off_t))
! *o |= ((off_t) ((*AH->ReadBytePtr) (AH))) << (off * 8);
else
{
if ((*AH->ReadBytePtr) (AH) != 0)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2004-02-05 19:20:43 Analyze not doing anything?
Previous Message Rajesh Kumar Mallah 2004-02-05 19:06:11 Re: Functions in CHECK constraint not getting dumped before