Re: Test 002_pg_upgrade fails with olddump on Windows

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Test 002_pg_upgrade fails with olddump on Windows
Дата
Msg-id ZW7XlErUc3pQPXHp@paquier.xyz
обсуждение исходный текст
Ответ на Test 002_pg_upgrade fails with olddump on Windows  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: Test 002_pg_upgrade fails with olddump on Windows  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
On Sat, Nov 25, 2023 at 11:00:01PM +0300, Alexander Lakhin wrote:
> diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
> index c6d83d3c21..d34b45e346 100644
> --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
> +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
> @@ -293,6 +293,7 @@ if (defined($ENV{oldinstall}))
>      }
>
>      open my $fh, ">", $dump1_file or die "could not open dump file";
> +    binmode $fh;
>      print $fh $dump_data;
>      close $fh;

There is something I don't get here.  The old and new dump files
should be processed in filter_dump(), where
AdjustUpgrade::adjust_old_dumpfile does the following so binmode
should not be needed:
        # use Unix newlines
        $dump =~ s/\r\n/\n/g;

Or you have used the test suite with an old installation that has the
same major version as the new installation, meaning that the filtering
was not happening, still you have detected some diffs?  It sounds to
me that we should just apply the filters to the dumps all the time if
you have used matching versions.  The filtering would remove only the
comments, some extra newlines and replace the CRLFs in this case.
--
Michael

Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: btree: downlink right separator/HIKEY optimization
Следующее
От: Nikita Malakhov
Дата:
Сообщение: Re: Avoid detoast overhead when possible