aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/logicalfuncs.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2021-11-09 14:21:35 -0500
committerRobert Haas <rhaas@postgresql.org>2021-11-09 14:29:15 -0500
commit5a1007a5088cd6ddf892f7422ea8dbaef362372f (patch)
tree642a5ec9a0cf536f350eb85aa81eb7b9b8f837ed /src/backend/replication/logical/logicalfuncs.c
parentee3a1a5b636b69dde33d68c428dd56b3389a4538 (diff)
downloadpostgresql-5a1007a5088cd6ddf892f7422ea8dbaef362372f.tar.gz
postgresql-5a1007a5088cd6ddf892f7422ea8dbaef362372f.zip
Have the server properly terminate tar archives.
Earlier versions of PostgreSQL featured a version of pg_basebackup that wanted to edit tar archives but was too dumb to parse them properly. The server made things easier for the client by failing to add the two blocks of zero bytes that ought to end a tar file, leaving it up to the client to do that. But since commit 23a1c6578c87fca0e361c4f5f9a07df5ae1f9858, we don't need this hack any more, because pg_basebackup is now smarter and can parse tar files even if they are properly terminated! So change the server to always properly terminate the tar files. Older versions of pg_basebackup can't talk to new servers anyway, so there's no compatibility break. On the pg_basebackup side, we see still need to add the terminating zero bytes if we're talking to an older server, but not when the server is v15+. Hopefully at some point we'll be able to remove some of this compatibility cruft, but it seems best to hang on to it for now. In passing, add a file header comment to bbstreamer_tar.c, to make it clearer what's going on here. Discussion: http://postgr.es/m/CA+TgmoZbNzsWwM4BE5Jb_qHncY817DYZwGf+2-7hkMQ27ZwsMQ@mail.gmail.com
Diffstat (limited to 'src/backend/replication/logical/logicalfuncs.c')
0 files changed, 0 insertions, 0 deletions