pgsql: Refactor tests for catalog diff comparisons in stats_import.sql

2026-03-08 Thread Michael Paquier
Refactor tests for catalog diff comparisons in stats_import.sql The tests of stats_import.sql include a set of queries to do differential checks of the three statistics catalog relations, based on the comparison of a source relation and a target relation, used for the copy of the stats data with t

pgsql: Fix typo in stats_import.sql

2026-03-08 Thread Michael Paquier
Fix typo in stats_import.sql The test mentioned pg_stat_ext_exprs, but the correct catalog name is pg_stats_ext_exprs. Thinko in ba97bf9cb7b4. Discussion: https://postgr.es/m/CADkLM=eEhxJpSUP+eC=emgzzsvopnfkdvvkucbsfg9cajyw...@mail.gmail.com Branch -- master Details --- https://git.po

pgsql: Fix size underestimation of DSA pagemap for odd-sized segments

2026-03-08 Thread Michael Paquier
Fix size underestimation of DSA pagemap for odd-sized segments When make_new_segment() creates an odd-sized segment, the pagemap was only sized based on a number of usable_pages entries, forgetting that a segment also contains metadata pages, and that the FreePageManager uses absolute page indices

pgsql: Fix size underestimation of DSA pagemap for odd-sized segments

2026-03-08 Thread Michael Paquier
Fix size underestimation of DSA pagemap for odd-sized segments When make_new_segment() creates an odd-sized segment, the pagemap was only sized based on a number of usable_pages entries, forgetting that a segment also contains metadata pages, and that the FreePageManager uses absolute page indices

pgsql: Fix size underestimation of DSA pagemap for odd-sized segments

2026-03-08 Thread Michael Paquier
Fix size underestimation of DSA pagemap for odd-sized segments When make_new_segment() creates an odd-sized segment, the pagemap was only sized based on a number of usable_pages entries, forgetting that a segment also contains metadata pages, and that the FreePageManager uses absolute page indices

pgsql: Fix size underestimation of DSA pagemap for odd-sized segments

2026-03-08 Thread Michael Paquier
Fix size underestimation of DSA pagemap for odd-sized segments When make_new_segment() creates an odd-sized segment, the pagemap was only sized based on a number of usable_pages entries, forgetting that a segment also contains metadata pages, and that the FreePageManager uses absolute page indices

pgsql: Fix size underestimation of DSA pagemap for odd-sized segments

2026-03-08 Thread Michael Paquier
Fix size underestimation of DSA pagemap for odd-sized segments When make_new_segment() creates an odd-sized segment, the pagemap was only sized based on a number of usable_pages entries, forgetting that a segment also contains metadata pages, and that the FreePageManager uses absolute page indices

pgsql: Fix size underestimation of DSA pagemap for odd-sized segments

2026-03-08 Thread Michael Paquier
Fix size underestimation of DSA pagemap for odd-sized segments When make_new_segment() creates an odd-sized segment, the pagemap was only sized based on a number of usable_pages entries, forgetting that a segment also contains metadata pages, and that the FreePageManager uses absolute page indices