Re: pg_dump and large files - is this a problem?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Giles Lean <giles(at)nemeton(dot)com(dot)au>
Subject: Re: pg_dump and large files - is this a problem?
Date: 2002-10-24 02:08:15
Message-ID: 200210240208.g9O28FM27782@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Well, that certainly changes the functionality of the code. I thought
that fseeko test was done so that things that couldn't be seeked on were
detected. Not sure what isn't seek-able, maybe named pipes. I thought
it was testing that so I didn't touch that variable.

This was my original thought, that we have non-fseeko code in place.
Can we just trigger the non-fseeko code on HAS_FSEEKO. The code would
be something like:

if (sizeof(long) >= sizeof(off_t))
ctx->hasSeek = TRUE;
else
#ifdef HAVE_FSEEKO
ctx->hasSeek = TRUE;
#else
ctx->hasSeek = FALSE;
#endif

---------------------------------------------------------------------------

Philip Warner wrote:
> At 11:55 AM 24/10/2002 +1000, Philip Warner wrote:
>
> >The only code that uses SEEK_CUR is the code to check if seek is available
> >- I am ver happy to change that to SEEK_SET - I can't even recall why I
> >used SEEK_CUR. The code that does the real seeks uses SEEK_SET.
>
> Come to think of it:
>
> ctx->hasSeek = (fseeko(AH->FH, 0, SEEK_CUR) == 0);
>
> should be replaced by:
>
> #ifdef HAS_FSEEK[O]
> ctx->hasSeek = TRUE;
> #else
> ctx->hasSeek = FALSE;
> #endif
>
> Since we're now checking for it in configure, we should remove the checks
> from the pg_dump code.
>
>
>
>
> ----------------------------------------------------------------
> Philip Warner | __---_____
> Albatross Consulting Pty. Ltd. |----/ - \
> (A.B.N. 75 008 659 498) | /(@) ______---_
> Tel: (+61) 0500 83 82 81 | _________ \
> Fax: (+61) 0500 83 82 82 | ___________ |
> Http://www.rhyme.com.au | / \|
> | --________--
> PGP key available upon request, | /
> and from pgp5.ai.mit.edu:11371 |/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2002-10-24 02:14:35 Re: pg_dump and large files - is this a problem?
Previous Message Bruce Momjian 2002-10-24 02:03:17 Re: pg_dump and large files - is this a problem?