Improve TAP tests of pg_upgrade for cross-version tests
От | Michael Paquier |
---|---|
Тема | Improve TAP tests of pg_upgrade for cross-version tests |
Дата | |
Msg-id | Yox1ME99GhAemMq1@paquier.xyz обсуждение исходный текст |
Ответы |
Re: Improve TAP tests of pg_upgrade for cross-version tests
|
Список | pgsql-hackers |
Hi all, (Adding Andrew Dunstan in CC.) I have been toying with $subject, trying to improve the ways to test pg_upgrade across different major versions as perl makes that easier. The buildfarm does three things to allow such tests to work (see TestUpgradeXversion.pm): - Apply a filter to the dumps generated to make them perfectly equal as the set of regexps on the SQL dumps (removal of empty lines and comments in the SQL dumps as arguments of a diff command). - Apply diffs dumps to remove or modify objects, to avoid inconsistencies, which is what upgrade_adapt.sql does in the tree. - Add tweaks to the dump commands used, like --extra-float-digits=0 when testing with a version <= 11 as origin (aka c6f9464b in the buildfarm client). Attached is a basic patch to show what can be used to improve the TAP tests of pg_upgrade in this area, with contents coming mostly from the buildfarm client. The end picture would be to allow all those tests to use the core code, rather than duplicating that in the buildfarm client. This reduces a lot the amount of noise that can be seen when comparing the dumps taken (the tests pass with v14) while remaining simple, down to v11, so that could be a first step. There are a couple of things where I am not sure how the buildfarm handles things, but perhaps the dumps of installcheck have been tweaked to ignore such cases? Here is an exhaustive list: - multirange_type_name when using PG <= v13 as origin, for CREATE TYPE. - CREATE/ALTER PROCEDURE append IN to the list of parameters dumped, when using PG <= v13 as origin. - CREATE OPERATOR CLASS and ALTER OPERATOR FAMILY, where FUNCTION 2 is moved from one command to the other. Thoughts? -- Michael
Вложения
В списке pgsql-hackers по дате отправления: