Re: pg_dump's checkSeek() seems inadequate - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump's checkSeek() seems inadequate
Date
Msg-id 4908.1277686552@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump's checkSeek() seems inadequate  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Jun 27, 2010 at 6:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> A somewhat more plausible scenario is that somebody might hope that
>> they could do something like this:
>> 
>>        echo 'some custom header' >pg.dump
>>        pg_dump -Fc >>pg.dump

> That doesn't actually sound all that far-fetched.

I've got my doubts, but I guess we could write an even-more-bulletproof
test by doing ftello() and then seeing if fseeko to that position
complains.  This might be a good thing anyway since most of the other
uses of ftello aren't really checking for errors ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: suppress automatic recovery after back crash
Next
From: Tom Lane
Date:
Subject: Re: suppress automatic recovery after back crash