On Thu, Apr 8, 2021 at 1:12 PM Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote:
> On 2021-Apr-08, Tom Lane wrote: > > > > So I tend to think that my initial instinct was the better direction: > we > > > should not be doing any find_all_inheritors() here at all, but instead > > > rely on pg_class.reltuples to be set for the partitioned table. > > > > +1 > > This patch does that. > > -- > Álvaro Herrera 39°49'30"S 73°17'W > "I dream about dreams about dreams", sang the nightingale > under the pale moon (Sandman) > Hi, Within truncate_update_partedrel_stats(), dirty is declared within the loop. + if (rd_rel->reltuples != 0) + { ... + if (dirty) The two if blocks can be merged. The variable dirty can be dropped. Cheers