Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86f23d9

Browse files
committed
Improve pg_basebackup long file name test Windows robustness
Creation of a file with a very long name can create problems on Windowsdue to its file path limits. Work around that by creating the file via asymlink with a shorter name.Error displayed by buildfarm animal fairywren.oBackpatch to all live branches
1 parent4b15868 commit86f23d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/bin/pg_basebackup/t/010_pg_basebackup.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,16 +305,20 @@
305305
'-T with invalid format fails');
306306

307307
# Tar format doesn't support filenames longer than 100 bytes.
308+
# Create the test file via a short name directory so it doesn't blow the
309+
# Windows path limit.
310+
my$lftmp = PostgreSQL::Test::Utils::tempdir_short;
311+
dir_symlink"$pgdata","$lftmp/pgdata";
308312
my$superlongname ="superlongname_" . ("x"x100);
309-
my$superlongpath ="$pgdata/$superlongname";
313+
my$superlongpath ="$lftmp/pgdata/$superlongname";
310314

311315
openmy$file,'>',"$superlongpath"
312316
ordie"unable to create file$superlongpath";
313317
close$file;
314318
$node->command_fails(
315319
[@pg_basebackup_defs,'-D',"$tempdir/tarbackup_l1",'-Ft' ],
316320
'pg_basebackup tar with long name fails');
317-
unlink"$pgdata/$superlongname";
321+
unlink"$superlongpath";
318322

319323
# The following tests are for symlinks.
320324

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp