citusdata / citus

Distributed PostgreSQL as an extension
https://www.citusdata.com
GNU Affero General Public License v3.0
10.63k stars 670 forks source link

PG17 compatibility: Fix Test Failure in pg13_propagate_statistics #7728

Closed m3hm3t closed 1 week ago

m3hm3t commented 1 week ago

Changed stxstattarget in pg_statistic_ext to use nullable representation, removing explicit -1 for default statistics target in PostgreSQL 17. https://github.com/postgres/postgres/commit/012460ee93c304fbc7220e5b55d9d0577fc766ab

SELECT stxstattarget, stxrelid::regclass
FROM pg_statistic_ext
WHERE stxnamespace IN (
    SELECT oid
    FROM pg_namespace
    WHERE nspname IN ('statistics''TestTarget')
)
AND stxname SIMILAR TO '%\_\d+'
ORDER BY stxstattarget, stxrelid::regclass ASC;
  stxstattarget |             stxrelid              
 ---------------+-----------------------------------
-            -1 | "statistics'TestTarget".t1_980000
-            -1 | "statistics'TestTarget".t1_980002
...
+               | "statistics'TestTarget".t1_980000
+               | "statistics'TestTarget".t1_980002
...
codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (release-13.0@c0a5f5c). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-13.0 #7728 +/- ## =============================================== Coverage ? 89.64% =============================================== Files ? 274 Lines ? 59582 Branches ? 7436 =============================================== Hits ? 53412 Misses ? 4038 Partials ? 2132 ```