Test 002_pg_upgrade fails with olddump on Windows

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Test 002_pg_upgrade fails with olddump on Windows
Дата
Msg-id 60d434b9-53d9-9ea1-819b-efebdcf44e41@gmail.com
обсуждение исходный текст
Ответы Re: Test 002_pg_upgrade fails with olddump on Windows
Список pgsql-hackers
Hello,

When trying to use a custom dump with the test pg_upgrade/002_pg_upgrade,
I observe the following test failure on Windows:
 >meson test --suite setup
 >echo create database regression>...\dump.sql
 >set olddump=...\dump.sql& set oldinstall=.../tmp_install/usr/local/pgsql& meson test pg_upgrade/002_pg_upgrade

1/1 postgresql:pg_upgrade / pg_upgrade/002_pg_upgrade ERROR            11.38s   exit status 1

regress_log_002_pg_upgrade.txt contains:
...
[09:07:06.704](3.793s) ok 11 - run of pg_upgrade for new instance
...
[09:07:07.301](0.001s) not ok 15 - old and new dumps match after pg_upgrade
[09:07:07.301](0.000s) #   Failed test 'old and new dumps match after pg_upgrade'
#   at .../src/bin/pg_upgrade/t/002_pg_upgrade.pl line 452.
[09:07:07.301](0.000s) #          got: '1'
#     expected: '0'
=== diff of ...\build\testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8/dump1.sql and 
...\build\testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8/dump2.sql
=== stdout ===
=== stderr ===
=== EOF ===


 >dir "testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8/"
11/25/2023  09:06 AM             2,729 dump1.sql
11/25/2023  09:07 AM             2,590 dump2.sql

 >diff -s "testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump1.sql" 
"testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump2.sql"
Files testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump1.sql and 
testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump2.sql are identical

As I can see, dump1.sql contains line endings 0d 0a, while dump2.sql — 0a.

The attached patch fixes the issue for me.

Best regards,
Alexander
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: New instability in stats regression test
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: brininsert optimization opportunity