Re: doc phrase: "inheritance child"
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
David Rowley <david.rowley@2ndquadrant.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@hpe.com>,
Tomas Vondra <tomas.vondra@enterprisedb.com>
Date: 2022-05-27T03:47:18Z
Lists: pgsql-hackers
Hi,
On Wed, May 25, 2022 at 1:30 PM Ashutosh Bapat
<ashutosh.bapat@enterprisedb.com> wrote:
> @@ -7306,7 +7306,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
> <para>
> Normally there is one entry, with <structfield>stainherit</structfield> =
> <literal>false</literal>, for each table column that has been analyzed.
> - If the table has inheritance children, a second entry with
> + If the table has inheritance children or partitions, a second entry with
> <structfield>stainherit</structfield> = <literal>true</literal> is also created. This row
> represents the column's statistics over the inheritance tree, i.e.,
> statistics for the data you'd see with
>
> For partitioned tables only the second entry makes sense. IIRC, we had done some work to remove the first entry. Can you please check whether a partitioned table also has two entries?
Don't think we've made any changes yet that get rid of the parent
partitioned table's entry in pg_statistic:
create table foo (a int) partition by list (a);
create table foo1 partition of foo for values in (1);
analyze foo;
select starelid::regclass, stainherit from pg_statistic where
starelid::regclass in (select relid from pg_partition_tree('foo'));
starelid | stainherit
----------+------------
foo | t
foo1 | f
(2 rows)
Maybe you're thinking of RangeTblEntry that the planner makes 2 copies
for inheritance parents, but only 1 for partition parents as of
e8d5dd6be79.
--
Thanks, Amit Langote
EDB: http://www.enterprisedb.com
Commits
-
doc: avoid saying "inheritance" ...
- 70a437aa45b6 16.0 landed
- 02e5c273a2dc 15.0 landed