Gavin Sherry <swm@linuxworld.com.au> writes:
> On Tue, 30 Mar 2004, Bruce Momjian wrote:
>> I like an end-of-dump marker for folks who want to check if the dump got
>> truncated somehow. I can see how to do that for text dumps, but what
>> about for tar or custom dumps?
> Wouldn't it be more effective to test for non zero return status as this
> handles -Fc cases, etc, which would be non-trivial to test.
In the tar and custom archive formats, it's fairly obvious if the file
was truncated: you'll have table-of-contents entries that point past
the end of file. The only case that really needs an endmarker is
textual scripts --- both straight from pg_dump, and produced by
pg_restore.
regards, tom lane