Re: pg_restore fails with a custom backup file

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, pgsql-hackers(at)postgresql(dot)org, Yoshiyuki Asaba <y-asaba(at)sraoss(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg_restore fails with a custom backup file
Date: 2006-12-18 14:50:12
Message-ID: 200612181450.kBIEoCj23034@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
> On Fri, Dec 15, 2006 at 12:57:50AM +0900, Hiroshi Saito wrote:
> >
> > >Win32 does not implement fseeko() and ftello(). So I think it limit to
> > >handle a 2GB file. Is this a specification?
> >
> > Yes, Magnus-san suggested the problem. It is present TODO. The entire
> > adjustment was still difficult though I had tried it. SetFilePointer might
> > be able to be saved. However, I think it might be an attempt of 8.3...
>
> I've been looking at a fix for this, and I think I have it. The solution
> looks to be to redefine off_t to 64-bit (the standard headers *always*
> define it as 32-bit, and there is no way to change that - at least not
> that I can find).
>
> I have the fix made for just bin/pg_dump for now (in pg_dump.h), and I'm
> testing that. (So far only on MSVC builds)
>
> A question though - is there any *gain* from using 64-bit offsets in the
> actual backend? The change could of course be done in port.h, but that

No, not really. All files are kept < 1gig for the backend. We had code
for that from Berkeley, so we have just kept it.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matt Miller 2006-12-18 14:56:59 pgcluster-1.7.0rc1-patch
Previous Message Andrew Dunstan 2006-12-18 14:44:56 Re: Question about debugging bootstrapping and catalog