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 alter_index #7749

Closed m3hm3t closed 4 days ago

m3hm3t commented 1 week ago

Changed attstattarget in pg_attribute to use NullableDatum, allowing null representation for default statistics target in PostgreSQL 17. https://github.com/postgres/postgres/commit/6a004f1be87d34cfe51acf2fe2552d2b08a79273

 -- verify statistics is set
 SELECT c.relname, a.attstattarget
 FROM pg_attribute a
 JOIN pg_class c ON a.attrelid = c.oid AND c.relname LIKE 'test\_idx%'
 ORDER BY c.relname, a.attnum;
   relname  | attstattarget 
 -----------+---------------
  test_idx  |          4646
- test_idx2 |            -1
+ test_idx2 |              
  test_idx2 |         10000
  test_idx2 |          3737
 (4 rows)
m3hm3t commented 1 week ago

old pr: https://github.com/citusdata/citus/pull/7729

codecov[bot] commented 4 days 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 #7749 +/- ## =============================================== Coverage ? 89.64% =============================================== Files ? 274 Lines ? 59583 Branches ? 7436 =============================================== Hits ? 53416 Misses ? 4035 Partials ? 2132 ```