Re: [PATCH] Do not use StdRdOptions in Access Methods

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Nikolay Shaplov <dhyan@nataraj.su>, Dent John <denty@qqdd.eu>, Thomas Munro <thomas.munro@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "Iwata, Aya" <iwata.aya@jp.fujitsu.com>, Dmitry Dolgov <9erthalion6@gmail.com>
Date: 2019-11-13T05:29:49Z
Lists: pgsql-hackers
On Wed, Nov 13, 2019 at 2:18 PM Michael Paquier <michael@paquier.xyz> wrote:
> On Wed, Nov 13, 2019 at 10:52:52AM +0900, Amit Langote wrote:
> > Thanks for chiming in about that.  I guess that means that we don't
> > need those macros, except GET_STRING_RELOPTION_LEN() that's used in
> > allocateReloptStruct(), which can be moved to reloptions.c.  Is that
> > correct?
>
> I have been looking on the net to see if there are any traces of code
> using those macros, but could not find any.  The last trace of a macro
> use is in 8ebe1e3, which just relies on GET_STRING_RELOPTION_LEN.  So
> it looks rather convincing now to just remove this code.  Attached is
> a patch for that.

Thank you.

> There could be an argument for keeping
> GET_STRING_RELOPTION actually which is still useful to get a string
> value in an option set using the stored offset, and we have
> the recently-added dummy_index_am in this category.  Any thoughts?

Not sure, maybe +0.5 on keeping GET_STRING_RELOPTION.

Thanks,
Amit



Commits

  1. Refactor reloption handling for index AMs in-core

  2. Cleanup code in reloptions.h regarding reloption handling

  3. Refactor code building relation options

  4. Add some assertions to view reloption macros