On 2019/05/10 12:18, David Rowley wrote:
> On Fri, 10 May 2019 at 12:08, Bruce Momjian <bruce@momjian.us> wrote:
>>> 17f206f Set pg_class.relhassubclass for partitioned indexes
>>
>> I need help with this one. I know the system column existed in previous
>> releases, so how is it different now? Do we document system table
>> changes that are implementation-behavior in the release notes? Usually
>> we don't.
>
> This appears to be fixing something that likely should have been done
> in PG11, where partitioned indexes were added.
That's true. We (Michael and I) felt the need to do this change, because
it allowed the pg_partition_tree() code (which is also new in v12) to use
the same infrastructure for both partitioned tables and indexes; checking
the relhassubclass flag allows to short-circuit scanning pg_inherits to
find out that there are no children.
> Originally the column
> was for inheritance parent tables, then later used for partitioned
> tables. It seems partitioned indexes just overlooked setting it to
> true in PG11 and this commit fixed that. Of course, backpacking that
> fix wouldn't be very useful for partitioned indexes that were already
> created, so it was a master only change.
There was no discussion on whether or not to back-patch this to v11, but
the above makes sense.
Regarding whether or not this commit needs a release note mention, I'm not
that sure but maybe we should if Justin thinks it's useful information.
Thanks,
Amit