pg_basebackup is taking backup of extra files inside a tablespace directory
| От | Hari Babu |
|---|---|
| Тема | pg_basebackup is taking backup of extra files inside a tablespace directory |
| Дата | |
| Msg-id | 007301cdcd35$5c086ff0$14194fd0$@kommi@huawei.com обсуждение исходный текст |
| Список | pgsql-hackers |
<div class="WordSection1"><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">pg_basebackupis taking backup of extra files other than databaserelated files in side a TABLESPACE directory.</span><br /><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Scenario:</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> 1) Create tablespace in existing directory '/opt/tblspc'having some extra files and folders.</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> create tablespace tbs1 location '/opt/tblspc';</span><br/><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> 2) Now execute thepg_basebackup command; </span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> Wecan see it will copy the extra files in '/opt/tblspc' directory</span><br /><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Ithink backup should be done only files and folders present inside'/opt/tblspc/PG_*' directory (TABLESPACE_VERSION_DIRECTORY). </span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Notall the files and folders in side '/opt/tblspc.' directory.</span><br/><br /><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Is it ok to fix in thefollowing way?</span><br /><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">In function perform_base_backup,</span><br /><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">while sending thetablespaces one by one we can send the header for Linkpath/TABLESPACE_VERSION_DIRECTORY</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">asseparate header and sendDir for "Linkpath/TABLESPACE_VERSION_DIRECTORY" as path.</span><br /><br /><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Regards,</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Haribabu.</span><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span></div>
В списке pgsql-hackers по дате отправления: