Re: doc phrase: "inheritance child"

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: doc phrase: "inheritance child"
Дата
Msg-id CA+HiwqF1LiUffYXXRVWF222Vb25NcW-Ps1U2xn4yj5rMRWNsWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: doc phrase: "inheritance child"  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Список 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
youplease 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Assert name/short_desc to prevent SHOW ALL segfault
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~