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 200210242343.g9ONh0V02970@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:
> 
> > OK, NetBSD added.
> >
> > Any other OS's need this?  Is it safe for me to code something that
> > assumes fpos_t and off_t are identical?  I can't think of a good way to
> > test if two data types are identical.  I don't think sizeof is enough.
> 
> No, you can't assume that fpos_t and off_t are identical.

I was wondering --- if fpos_t and off_t are identical sizeof, and fpos_t
can do shift << or >>, that means fpos_t is also integral like off_t.
Can I then assume they are the same?

> But you can simulate a long fseeko() by calling fseek() multiple times, so
> it should be possible to write a replacement that works on all systems.

Yes, but I can't simulate ftello, so I then can't do SEEK_CUR. and if I
can't duplicate the entire API, I don't want to try.

--  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: Tom Lane
Date:
Subject: Re: pg_database datistemplate
Next
From: Bruce Momjian
Date:
Subject: Re: pg_dump and large files - is this a problem?