On Mon, 1 May 2023 at 15:03, PG Bug reporting form <noreply@postgresql.org> wrote: > I found that the > alter table sometable alter somecolumn set (n_distinct=...); > Doesn't affect distinct values estimation if sometable - declarative > partitioned table.
It might not be that intuitive, but n_distinct_inherited is the option for that.
Maybe the documentation [1] should mention partition partitions as well as "inheritance children" is this isn't clear.