On Thu, Nov 21, 2019 at 09:39:53PM +0300, Nikolay Shaplov wrote:
> BRIN_AM_OID and friends are defined in catalog/pg_am_d.h so for core indexes
> we can do relation->rd_rel->relam == BRIN_AM_OID check. But for contrib
> indexes we can't do such a thing.
> Bloom index does not need such check as it uses options only when index is
> created. At that point you can not choose wrong relation. But if in future we
> will have some contrib index that uses options when it some data is inserted
> (as it is done with fillfactor in core indexes) then index author will not be
> able to do such relam check. I would not call it a big problem, but it is
> something to think about, for sure...
I don't think that you actually need that for custom index AMs anyway,
as all code paths leading to the lookup of their reloption values is
within the module they are defined in.
> Thaks for joining this work, and sorry for late replies. Now I quite rarely
> have time for postgres :-(
We all have a life, don't worry. I am glad to see you around.
--
Michael