Skip site navigation (1) Skip section navigation (2)

Re: Patch: incorrect array offset in backend replication tar header

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Brian Weaver <cmdrclueless(at)gmail(dot)com>, Marko Tiikkaja <pgmail(at)joh(dot)to>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: incorrect array offset in backend replication tar header
Date: 2012-09-27 22:53:20
Message-ID: CABUevEz+4wdVn8nToAiAHRx1NsT-gpvpm3UDhkquQF9DJ-xW5A@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Sep 28, 2012 at 12:45 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> Ah, yeah, that should also work I guess. But you could also just leave
>> the the data in the temporary tarfile the whole time. IIRC, you can
>> just cat one tarfile to the end of another one, right?
>
> Not if they're written according to spec, I think.  There is an EOF
> marker consisting of 2 blocks of zeroes (which pg_dump is failing to
> create correctly, but that's a bug not a feature).  Possibly you could
> strip the EOF marker though, if the file join code is allowed to be
> something smarter than "cat".

Hmm. Yeah. It seems gnu tar has "--concatenate".... Not sure if it's
in the standard or a GNU extension though. But it says:

"
However, tar archives incorporate an end-of-file marker which must be
removed if the concatenated archives are to be read properly as one
archive. `--concatenate' removes the end-of-archive marker from the
target archive before each new archive is appended. If you use cat to
combine the archives, the result will not be a valid tar format
archive. If you need to retrieve files from an archive that was added
to using the cat utility, use the --ignore-zeros (-i) option.
"



-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-09-27 22:55:34
Subject: Re: Patch: incorrect array offset in backend replication tar header
Previous:From: Andrew DunstanDate: 2012-09-27 22:47:13
Subject: Re: Patch: incorrect array offset in backend replication tar header

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group