diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/stats_export_import.out /tmp/cirrus-ci-build/build/testrun/recovery/027_stream_regress/data/results/stats_export_import.out --- /tmp/cirrus-ci-build/src/test/regress/expected/stats_export_import.out 2024-02-29 22:36:43.277317467 +0000 +++ /tmp/cirrus-ci-build/build/testrun/recovery/027_stream_regress/data/results/stats_export_import.out 2024-02-29 22:40:54.993125498 +0000 @@ -630,40 +630,32 @@ \gset SELECT pg_import_rel_stats('stats_export_import.test'::regclass, :'invalid_types_doc'::jsonb, true, true); -ERROR: statistic export JSON document "types" has duplicate rows with oid = 2 +ERROR: Cannot import statistics from server version 170000 to -223390088 SELECT pg_import_rel_stats('stats_export_import.test'::regclass, :'invalid_collations_doc'::jsonb, true, true); -ERROR: statistic export JSON document "collations" has duplicate rows with oid = 1 +ERROR: Cannot import statistics from server version 170000 to -222795800 SELECT pg_import_rel_stats('stats_export_import.test'::regclass, :'invalid_operators_doc'::jsonb, true, true); -ERROR: statistic export JSON document "operators" has duplicate rows with oid = 3 +ERROR: Cannot import statistics from server version 170000 to -222738312 SELECT pg_import_rel_stats('stats_export_import.test'::regclass, :'invalid_attributes_doc'::jsonb, true, true); -ERROR: statistic export JSON document "attributes" has duplicate rows with attnum = 4 +ERROR: Cannot import statistics from server version 170000 to -223638888 SELECT pg_import_rel_stats('stats_export_import.test'::regclass, :'invalid_statistics_doc'::jsonb, true, true); -ERROR: statistic export JSON document "statistics" has duplicate rows with staattnum = 1, stainherit = f +ERROR: Cannot import statistics from server version 170000 to -223655304 -- Import stats SELECT pg_import_rel_stats( 'stats_export_import.test'::regclass, :'table_stats_json'::jsonb, true, false); - pg_import_rel_stats ---------------------- - t -(1 row) - +ERROR: Cannot import statistics from server version 170000 to -224455832 SELECT pg_import_rel_stats( 'stats_export_import.is_odd'::regclass, :'index_stats_json'::jsonb, true, false); - pg_import_rel_stats ---------------------- - t -(1 row) - +ERROR: Cannot import statistics from server version 170000 to -223390088 SELECT pg_import_ext_stats( e.oid, :'ext_stats_json'::jsonb, @@ -672,11 +664,7 @@ FROM pg_statistic_ext AS e WHERE e.stxrelid = 'stats_export_import.test'::regclass AND e.stxname = 'evens_test'; - pg_import_ext_stats ---------------------- - t -(1 row) - +ERROR: Cannot import statistics from server version 170000 to -222795800 -- This should return 0 rows SELECT staattnum, stainherit, stanullfrac, stawidth, stadistinct, stakind1, stakind2, stakind3, stakind4, stakind5, @@ -694,9 +682,14 @@ FROM pg_statistic WHERE starelid IN ('stats_export_import.test'::regclass, 'stats_export_import.is_odd'::regclass); - staattnum | stainherit | stanullfrac | stawidth | stadistinct | stakind1 | stakind2 | stakind3 | stakind4 | stakind5 | staop1 | staop2 | staop3 | staop4 | staop5 | stacoll1 | stacoll2 | stacoll3 | stacoll4 | stacoll5 | stanumbers1 | stanumbers2 | stanumbers3 | stanumbers4 | stanumbers5 | sv1 | sv2 | sv3 | sv4 | sv5 ------------+------------+-------------+----------+-------------+----------+----------+----------+----------+----------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+-------------+-------------+-------------+-------------+-------------+-----+-----+-----+-----+----- -(0 rows) + staattnum | stainherit | stanullfrac | stawidth | stadistinct | stakind1 | stakind2 | stakind3 | stakind4 | stakind5 | staop1 | staop2 | staop3 | staop4 | staop5 | stacoll1 | stacoll2 | stacoll3 | stacoll4 | stacoll5 | stanumbers1 | stanumbers2 | stanumbers3 | stanumbers4 | stanumbers5 | sv1 | sv2 | sv3 | sv4 | sv5 +-----------+------------+-------------+----------+-------------+----------+----------+----------+----------+----------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+-------------+-------------+--------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------------------+-----+--------------------------------------------------+-----+----- + 1 | f | 0 | 4 | -1 | 2 | 3 | 0 | 0 | 0 | 97 | 97 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | {1} | | | | {1,2,3,4} | | | | + 4 | f | 0.25 | 45 | -0.75 | 2 | 3 | 4 | 5 | 0 | 1072 | 1072 | 98 | 98 | 0 | 100 | 100 | 100 | 100 | 0 | | {-1} | {0.33333334,0.33333334,0.33333334,0.33333334,0.33333334,0.33333334,0.33333334,0.33333334,0.33333334,0} | {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2.3333333} | | {"{\"\\\"orange\\\"\",purple,cyan}","{blue,yellow}","{red,green}"} | | {"\"orange\"",blue,cyan,green,purple,red,yellow} | | + 3 | f | 0.25 | 61 | -0.75 | 2 | 3 | 0 | 0 | 0 | 2990 | 2990 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | {1} | | | | {"(1,1.1,ONE,01-01-2001,\"{\"\"xkey\"\": \"\"xval\"\"}\")","(2,2.2,TWO,02-02-2002,\"[true, 4, \"\"six\"\"]\")","(3,3.3,TRE,03-03-2003,)"} | | | | + 2 | f | 0 | 4 | -1 | 2 | 3 | 0 | 0 | 0 | 664 | 664 | 0 | 0 | 0 | 100 | 100 | 0 | 0 | 0 | | {-0.4} | | | | {four,one,tre,two} | | | | + 1 | f | 0.25 | 1 | -0.5 | 1 | 3 | 0 | 0 | 0 | 91 | 58 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | {0.5} | {0.5} | | | | {t} | | | | +(5 rows) -- This should return 0 rows SELECT staattnum, stainherit, stanullfrac, stawidth, stadistinct, @@ -726,8 +719,8 @@ ORDER BY relname; relname | reltuples ---------+----------- - is_odd | 4 - test | 4 + is_odd | 0 + test | -1 (2 rows) -- This should return 0 rows @@ -760,9 +753,10 @@ JOIN pg_statistic_ext_data AS d ON d.stxoid = e.oid WHERE e.stxrelid = 'stats_export_import.test'::regclass AND e.stxname = 'evens_test'; - stxdinherit | stxdndistinct | stxddependencies | stxdmcv | stxdexpr --------------+---------------+------------------+---------+---------- -(0 rows) + stxdinherit | stxdndistinct | stxddependencies | stxdmcv | stxdexpr +-------------+---------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------- + f | {"2, -1": 4} | {"2 => -1": 1.000000, "-1 => 2": 0.500000} | \xc251a6e1010000000400000002001900000010000000040000001d00000020000000ffffffff00000000020000000200000000000000010000000100000004000000666f7572030000006f6e65030000007472650300000074776f00010001000000000000d03f000000000000b03f000000000000000000000000d03f000000000000c03f010000000000000000000000d03f000000000000c03f020000000000000000000000d03f000000000000b03f03000100 | {"(0,0,f,0.25,1,-0.5,1,3,0,0,0,91,58,0,0,0,0,0,0,0,0,{0.5},{0.5},,,,{f},,,,)"} +(1 row) SELECT staattnum, stainherit, stanullfrac, stawidth, stadistinct, stakind1, stakind2, stakind3, stakind4, stakind5,