On 2025-Jul-07, Álvaro Herrera wrote: > Meanwhile, crake is failing the cross-version upgrade test because of > this change, and I'm not sure what solution I'm going to offer. Maybe > use the AdjustUpgrade.pm infrastructure to set all the pg_lsn column > values to NULL if the old version is earlier than 19 and the new version > is 19 or later :-)
I think this should work, but I'm going to run against each of these versions to verify it before pushing. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Hay que recordar que la existencia en el cosmos, y particularmente la elaboración de civilizaciones dentro de él no son, por desgracia, nada idílicas" (Ijon Tichy)
>From 24d33edbb9dcdcb2fda44cf7a2ed7985977b60a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Herrera?= <alvhe...@kurilemu.de> Date: Mon, 7 Jul 2025 18:13:18 +0200 Subject: [PATCH] fix pg_upgrade test --- .../perl/PostgreSQL/Test/AdjustUpgrade.pm | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm index 1725fe2f948..6ace862d8f7 100644 --- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm +++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm @@ -251,6 +251,36 @@ sub adjust_database_contents 'drop operator if exists public.=> (bigint, NONE)'); } + # Version 19 changed the output format of pg_lsn. To avoid output + # differences, set all pg_lsn columns to NULL if the old version is + # older than 19. + if ($old_version < 19) + { + if ($old_version >= '9.5') + { + _add_st($result, + 'regression', + "update brintest set lsncol = NULL"); + } + + if ($old_version >= 12) + { + _add_st($result, + 'regression', + "update tab_core_types set pg_lsn = NULL"); + } + + if ($old_version >= 14) + { + for my $tab (qw(brintest_multi brintest_bloom)) + { + _add_st($result, + 'regression', + "update $tab set lsncol = NULL"); + } + } + } + return $result; } -- 2.39.5