relhassubclass and partitioned indexes

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: relhassubclass and partitioned indexes
Date: 2018-10-19 04:58:17
Message-ID: 80306490-b5fc-ea34-4427-f29c52156052@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

$subject came up in [1].

Should relhassubclass be set/reset for partitioned indexes?

The only use case being sought here is to use find_inheritance_children()
for getting an index's partitions, but it uses relhassublcass test to
short-circuit scanning pg_inherits. That means it cannot be used to get
an index's children, because relhassublcass is never set for indexes.

Michael suggested on the linked thread to get rid of relhassubclass
altogether, like we did for relhaspkey recently, but I'm not sure whether
it would be a good idea right yet.

Thoughts?

Thanks,
Amit

[1]
https://www.postgresql.org/message-id/3acdcbf4-6a62-fb83-3bfd-5f275602ca7d%40lab.ntt.co.jp

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2018-10-19 05:41:55 Re: Postgres, fsync, and OSs (specifically linux)
Previous Message Amit Langote 2018-10-19 04:05:52 Re: partition tree inspection functions