|
239 | 239 | # for the tablespace directories, which hopefully won't run afoul of
|
240 | 240 | # the 99 character length limit.
|
241 | 241 | my$sys_tempdir = TestLib::tempdir_short;
|
242 |
| -my$real_sys_tempdir = TestLib::perl2host($sys_tempdir) ."/tempdir"; |
243 |
| -my$shorter_tempdir =$sys_tempdir ."/tempdir"; |
244 |
| -dir_symlink"$tempdir",$shorter_tempdir; |
| 242 | +my$real_sys_tempdir ="$sys_tempdir/tempdir"; |
| 243 | +dir_symlink"$tempdir",$real_sys_tempdir; |
245 | 244 |
|
246 | 245 | mkdir"$tempdir/tblspc1";
|
247 | 246 | my$realTsDir ="$real_sys_tempdir/tblspc1";
|
248 |
| -my$real_tempdir = TestLib::perl2host($tempdir); |
249 | 247 | $node->safe_psql('postgres',
|
250 | 248 | "CREATE TABLESPACE tblspc1 LOCATION '$realTsDir';");
|
251 | 249 | $node->safe_psql('postgres',
|
|
324 | 322 | foreachmy$filename (@tempRelationFiles)
|
325 | 323 | {
|
326 | 324 | append_to_file(
|
327 |
| -"$shorter_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename", |
| 325 | +"$real_sys_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename", |
328 | 326 | 'TEMP_RELATION');
|
329 | 327 | }
|
330 | 328 |
|
|
334 | 332 |
|
335 | 333 | $node->command_ok(
|
336 | 334 | [
|
337 |
| -'pg_basebackup','-D', |
338 |
| -"$tempdir/backup1",'-Fp', |
339 |
| -"-T$realTsDir=$real_tempdir/tbackup/tblspc1" |
| 335 | +'pg_basebackup','-D', |
| 336 | +"$tempdir/backup1",'-Fp', |
| 337 | +"-T$realTsDir=$tempdir/tbackup/tblspc1", |
340 | 338 | ],
|
341 | 339 | 'plain format with tablespaces succeeds with tablespace mapping');
|
342 | 340 | ok(-d"$tempdir/tbackup/tblspc1",'tablespace was relocated');
|
|
384 | 382 |
|
385 | 383 | # Also remove temp relation files or tablespace drop will fail.
|
386 | 384 | my$filepath =
|
387 |
| -"$shorter_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename"; |
| 385 | +"$real_sys_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename"; |
388 | 386 |
|
389 | 387 | unlink($filepath)
|
390 | 388 | or BAIL_OUT("unable to unlink$filepath");
|
|
404 | 402 | $realTsDir =~s/=/\\=/;
|
405 | 403 | $node->command_ok(
|
406 | 404 | [
|
407 |
| -'pg_basebackup','-D', |
408 |
| -"$tempdir/backup3",'-Fp', |
409 |
| -"-T$realTsDir=$real_tempdir/tbackup/tbl\\=spc2" |
| 405 | +'pg_basebackup','-D', |
| 406 | +"$tempdir/backup3",'-Fp', |
| 407 | +"-T$realTsDir=$tempdir/tbackup/tbl\\=spc2", |
410 | 408 | ],
|
411 | 409 | 'mapping tablespace with = sign in path');
|
412 | 410 | ok(-d"$tempdir/tbackup/tbl=spc2",'tablespace with = sign was relocated');
|
|