At first look, this reminds me some catalog bloat issue. Can you provide
the result of these queries : SELECT pg_size_pretty(pg_table_size('pg_class')) AS size_pg_class; SELECT pg_size_pretty(pg_table_size('pg_attribute')) AS size_pg_attribute;
SELECT pg_size_pretty(pg_table_size('pg_class')) AS size_pg_class; --- '16 MB'
SELECT pg_size_pretty(pg_table_size('pg_attribute')) AS size_pg_attribute; --- '63 MB'