Re: tar-related code in PostgreSQL
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-04-24T16:27:53Z
Lists: 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
Commits
-
Assorted cleanup of tar-related code.
- 2961c9711c17 14.0 landed
-
Fix bogus tar-file padding logic for standby.signal.
- a08bfe742492 12.3 landed
- 0278d3f79a30 13.0 landed
-
Integrate recovery.conf into postgresql.conf
- 2dedf4d9a899 12.0 cited