Re: pg_dump's checkSeek() seems inadequate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump's checkSeek() seems inadequate
Date: 2010-06-27 18:33:41
Message-ID: 28889.1277663621@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> The test that checkSeek() is using is to see whether this works:
> fseeko(fp, 0, SEEK_CUR)
> and apparently on this platform that's a no-op even on an otherwise
> unseekable file.

BTW, I looked in the archives for related discussions and found only the
thread in which the current fseek-checking code was designed. There
were a couple of mentions that SEEK_CUR should be changed to SEEK_SET, eg
http://archives.postgresql.org/pgsql-hackers/2002-10/msg01088.php
but it was apparently focused around coping with specific seek APIs
that didn't have SEEK_CUR at all. We ended up not using those so the
change was never made. The thought that a no-op seek might not give
the right answer wasn't discussed AFAICT.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2010-06-27 19:40:44 Re: GSoC - code of implementation of materialized views
Previous Message Tom Lane 2010-06-27 17:42:11 pg_dump's checkSeek() seems inadequate