Re: tar-related code in PostgreSQL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: tar-related code in PostgreSQL
Date
Msg-id 5009.1587745673@sss.pgh.pa.us
Whole thread Raw
In response to tar-related code in PostgreSQL  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: tar-related code in PostgreSQL
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> We have similar code in many places -- because evidently nobody
> thought it would be a good idea to have all the logic for reading and
> writing tarfiles in a centralized location rather than having many
> copies of it -- and typically it's written to pad the block out to a
> multiple of 512 bytes. But here, the file is 0 bytes long, and then we
> add 511 zero bytes. This results in a tarfile whose length is not a
> multiple of the TAR block size:

Bleah.  Whether or not the nearest copy of tar happens to spit up on
that, it's a clear violation of the POSIX standard for tar files.
I'd vote for back-patching your 0001.

I'd lean mildly to holding 0002 until after we branch.  It probably
won't break anything, but it probably won't fix anything either.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: PostgreSQL 13 Beta 1 Release: 2020-05-21
Next
From: Juan José Santamaría Flecha
Date:
Subject: Re: Anybody want to check for Windows timezone updates?