Re: pg_dump and large files - is this a problem? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_dump and large files - is this a problem?
Date
Msg-id 200210230113.g9N1DJA28258@candle.pha.pa.us
Whole thread Raw
In response to Re: pg_dump and large files - is this a problem?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > I am concerned about one more thing.  On BSD/OS, we have off_t of quad
> > (8 byte), but we don't have fseeko, so this call looks questionable:
> >
> >     if (fseeko(AH->FH, tctx->dataPos, SEEK_SET) != 0)
> 
> Maybe you want to ask your OS provider how the heck this is supposed to
> work.  I mean, it's great to have wide types, but what's the point if the
> API can't handle them?

Excellent question.  They do have fsetpos/fgetpos, and I think they
think you are supposed to use those.  However, they don't do seek from
current position, and they don't take an off_t, so I am confused myself.

I did ask on the mailing list and everyone kind of agreed it was a
missing feature.  However, because of the way we call fseeko not knowing
if it is a quad or a long, I think we have to add the checks to prevent
such wild seeks from happening.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: Memory leaks
Next
From: "Marc G. Fournier"
Date:
Subject: Re: One 7.3 item left