relhassubclass and partitioned indexes - Mailing list pgsql-hackers

From Amit Langote
Subject relhassubclass and partitioned indexes
Date
Msg-id 80306490-b5fc-ea34-4427-f29c52156052@lab.ntt.co.jp
Whole thread Raw
Responses Re: relhassubclass and partitioned indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: partition tree inspection functions
Next
From: Craig Ringer
Date:
Subject: Re: Postgres, fsync, and OSs (specifically linux)