Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5JsH-0006bm-Gg for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2016 21:28:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b5JsG-0007FW-Lf for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2016 21:28:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b5JsF-0007EZ-8Z for pgsql-hackers@postgresql.org; Tue, 24 May 2016 21:28:23 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b5Js6-0007Ns-BV for pgsql-hackers@postgresql.org; Tue, 24 May 2016 21:28:22 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [216.155.90.98]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 5C749401263; Tue, 24 May 2016 14:28:07 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 34E495A3; Tue, 24 May 2016 17:28:05 -0400 (CLT) Date: Tue, 24 May 2016 17:28:05 -0400 From: Alvaro Herrera To: Robert Haas Cc: Nikolay Shaplov , "pgsql-hackers@postgresql.org" Subject: Re: [PROPOSAL] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind Message-ID: <20160524212805.GA462831@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas wrote: > On Tue, May 24, 2016 at 10:12 AM, Nikolay Shaplov > wrote: > > While working on patch for attribute options for indexes (see > > http://www.postgresql.org/message-id/5213596.TqFRiqmCTe@nataraj-amd64 ) > > I found out that code for reloptions is not flexible at all. > > > > All definitions of attoptons are stored in central catalog in > > src/backend/access/common/reloptions.c > > It is done this way for both heap and tuple relations, and also for all index > > access methods that goes with source code. > > > > Most of the code of the indexes is now hidden behind > > "access method" abstraction, but not the reloption code. If you grep through > > src/backend/access/common/reloptions.c, you will find RELOPT_KIND_GIN, > > RELOPT_KIND_BTREE, RELOPT_KIND_GIST, RELOPT_KIND_SPGIST, RELOPT_KIND_BRIN... > > > > This all should me moved behind "access method" abstraction... > > +1 for that concept. I'm not sure whether your implementation is good > or bad because I haven't really looked at it, but I agree that the way > the reloption stuff is structured is a nuisance, and injecting more > abstraction there seems like a good thing. As the author of the old stuff, I agree. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers