On Tue, Sep 03, 2019 at 08:59:53AM -0400, Robert Haas wrote:
> I think pg_basebackup is using homebrew code to generate tar files,
> but I'm reluctant to do that for reading tar files.
Yes. This code has not actually changed since its introduction.
Please note that we also have code which reads directly data from a
tarball in pg_basebackup.c when appending the recovery parameters to
postgresql.auto.conf for -R. There could be some consolidation here
with what you are doing.
> For generating a
> file, you can always emit the newest and "best" tar format, but for
> reading a file, you probably want to be prepared for older or cruftier
> variants. Maybe not -- I'm not super-familiar with the tar on-disk
> format. But I think there must be a reason why tar libraries exist,
> and I don't want to write a new one.
We need to be sure as well that the library chosen does not block
access to a feature in all the various platforms we have.
--
Michael