Re: BUG #17913: alter column set (n_distinct=...) on partition head doesn't work for declarative partitioned tables

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: maxim(dot)boguk(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17913: alter column set (n_distinct=...) on partition head doesn't work for declarative partitioned tables
Date: 2023-05-01 04:40:52
Message-ID: CAApHDvqQh7HBALTOa4GsQcdrK0HWgBDD+wH-+0gHbdMxH_j29A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 1 May 2023 at 15:03, PG Bug reporting form
<noreply(at)postgresql(dot)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.

David

[1] https://www.postgresql.org/docs/current/sql-altertable.html

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Maxim Boguk 2023-05-01 04:46:02 Re: BUG #17913: alter column set (n_distinct=...) on partition head doesn't work for declarative partitioned tables
Previous Message Peter Geoghegan 2023-05-01 04:04:56 Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger