On Tue, Feb 21, 2017 at 3:47 PM, Michael Banck <michael.ba...@credativ.de> wrote: > currently, the backup_label and (I think) the tablespace_map files are > (by design) conveniently located at the beginning of the main tablespace > tarball when making a basebackup. However, (by accident or also by > design?) the main tablespace is the last tarball[1] to be streamed via > the BASE_BACKUP replication protocol command. > > For pg_basebackup, this is not a real problem, as either each tablespace > is its own tarfile (in tar format mode), or the files are extracted > anyway (in plain mode). > > However, third party tools using the BASE_BACKUP command might want to > extract the backup_label, e.g. in order to figure out the START WAL > LOCATION. If they make a big tarball for the whole cluster potentially > including all external tablespaces, then the backup_label file is > somewhere in the middle of it and it takes a long time for tar to > extract it. > > So I am proposing the attached patch, which sends the base tablespace > first, and then all the other external tablespaces afterwards, thus > having base_backup be the first file in the tar in all cases. Does > anybody see a problem with that?
Please add this to commitfest.postgresql.org so it doesn't get forgotten. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers