pg_basebackup is taking backup of extra files other than database related
files in side a TABLESPACE directory.
Scenario:
1) Create tablespace in existing directory '/opt/tblspc' having
some extra files and folders.
create tablespace tbs1 location '/opt/tblspc';
2) Now execute the pg_basebackup command;
We can see it will copy the extra files in '/opt/tblspc'
directory
I think backup should be done only files and folders present inside
'/opt/tblspc/PG_*' directory (TABLESPACE_VERSION_DIRECTORY).
Not all the files and folders in side '/opt/tblspc.' directory.
Is it ok to fix in the following way?
In function perform_base_backup,
while sending the tablespaces one by one we can send the header for
Linkpath/TABLESPACE_VERSION_DIRECTORY
as separate header and sendDir for "Linkpath/TABLESPACE_VERSION_DIRECTORY "
as path.
Regards,
Hari babu.