Re: [PATCH] Do not use StdRdOptions in Access Methods - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Do not use StdRdOptions in Access Methods
Date
Msg-id 20191122073405.GE42684@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Do not use StdRdOptions in Access Methods  (Nikolay Shaplov <dhyan@nataraj.su>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: Why overhead of SPI is so large?
Next
From: Michael Paquier
Date:
Subject: Re: [PATCH] Do not use StdRdOptions in Access Methods