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

Commitf0b53da

Browse files
committed
Apply filters to dump files all the time in 002_pg_upgrade.pl
This commit removes the restriction that would not apply filters to thedumps used for comparison in the TAP test of pg_upgrade when using thesame base version for the old and new nodes.The previous logic would fail on Windows if loading a dump while usingthe same set of binaries for the old and new nodes, as the librarydependencies updated in the old dump would append CRLFs to the dumpfile as it is treated as a text file. The dump filtering logic replacesall CRLFs (\r\n) by LFs (\n), which is able to prevent this issue.When the old and new versions of the binaries are the same,AdjustUpgrade removes all blank lines, removes version-based commentsgenerated by pg_dump and replaces CRLFs by LFs.Reported-by: Alexander LakhinDiscussion:https://postgr.es/m/60d434b9-53d9-9ea1-819b-efebdcf44e41@gmail.comBackpatch-through: 15
1 parentbc0a368 commitf0b53da

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎src/bin/pg_upgrade/t/002_pg_upgrade.pl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,9 @@ sub filter_dump
364364
if ($oldnode->pg_version < 12);
365365
$newnode->command_ok(\@dump_command,'dump after running pg_upgrade');
366366

367-
# No need to apply filters on the dumps if working on the same version
368-
# for the old and new nodes.
369-
my$dump1_filtered =$dump1_file;
370-
my$dump2_filtered =$dump2_file;
371-
if ($oldnode->pg_version !=$newnode->pg_version)
372-
{
373-
$dump1_filtered = filter_dump(1,$oldnode->pg_version,$dump1_file);
374-
$dump2_filtered = filter_dump(0,$oldnode->pg_version,$dump2_file);
375-
}
367+
# Filter the contents of the dumps.
368+
my$dump1_filtered = filter_dump(1,$oldnode->pg_version,$dump1_file);
369+
my$dump2_filtered = filter_dump(0,$oldnode->pg_version,$dump2_file);
376370

377371
# Compare the two dumps, there should be no differences.
378372
my$compare_res = compare($dump1_filtered,$dump2_filtered);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp