Re: pg_dump end comment - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump end comment
Date
Msg-id 1730.1080656773@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump end comment  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: GIST code doesn't build on strict 64-bit machines
Next
From: Bruce Momjian
Date:
Subject: Re: pg_dump end comment