Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5uQE-0008JO-BA for pgsql-hackers@arkaria.postgresql.org; Thu, 26 May 2016 12:29:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b5uQD-0005YU-PZ for pgsql-hackers@arkaria.postgresql.org; Thu, 26 May 2016 12:29:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b5uQC-0005Xj-F5 for pgsql-hackers@postgresql.org; Thu, 26 May 2016 12:29:52 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5uQ8-0008Os-PH for pgsql-hackers@postgresql.org; Thu, 26 May 2016 12:29:51 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id BE61021C884B; Thu, 26 May 2016 15:29:46 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from mail.postgrespro.ru ([127.0.0.1]) by localhost (mail.postgrespro.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K-mW9bub9zVa; Thu, 26 May 2016 15:29:45 +0300 (MSK) Received: from nataraj-amd64.localnet (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 1CA9821C80B8; Thu, 26 May 2016 15:29:45 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1464265785; bh=Bgr7CYvOnb7yKhj7ywQZq7oYfJiy3MXV5ou04492bj8=; h=From:To:Subject:Date:In-Reply-To:References; b=F852ZXY0owGW6zcHixtqV6Wzu8spOP6TMfcievh+tWjNwUnIscIQgAYTB1wN/OWXu EQEzGTELC45+A3fgRzkVi0a+Ya9/X5qufr/iUrsdaa9RdVnfiyNVlVrhPa/rBG2fdO xuED85pQnc8sCOIUBDmzeM+P8H0F+WcWeSkb8H9k= From: Nikolay Shaplov To: Alvaro Herrera , 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 Date: Thu, 26 May 2016 15:29:44 +0300 Message-ID: <1756891.5znqRt8KMB@nataraj-amd64> User-Agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) In-Reply-To: <20160525180317.GA598084@alvherre.pgsql> References: <20160525180317.GA598084@alvherre.pgsql> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Pg-Spam-Score: -3.4 (---) 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 =D0=92 =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 =D0=BE=D1=82 25 =D0=BC=D0=B0=D1= =8F 2016 14:03:17 =D0=92=D1=8B =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB= =D0=B8: > > > > >This all should me moved behind "access method" abstraction... > > > >=20 > > > > +1 relopt_kind should be moved in am, at least. Or removed. > > >=20 > > > Hm, but we have tablespace options too, so I'm not sure that using AM= as > > > abstraction level is correct. > >=20 > > We will use am for all indexes, and keep all the rest in relopotion.c f= or > > non-indexes. May be divided options catalog into sections one section f= or > > each kind. > That makes sense. I can review the patch later. That would be great! ;-) >=20 > > And as I also would like to use this code for dynamic attoptions later,= I > > would like to remove relopt_kind at all. Because it spoils live in that > > case. > As I remember, Fabr=C3=ADzio (in CC) had a patch for dynamic reloptions, = but > there was some problem with it and we dumped it; see > https://www.postgresql.org/message-id/CAFcNs+rqCq1H5eXW-cvdti6T-xo2STEkhj= REx > =3DOdmAkK5tiOOw@mail.gmail.com for previous discussion. I've read the start of that thread. In my opinion Fabr=C3=ADzio offering qu= ite=20 different thing. I am speaking about adding options to a new object (access= =20 method or later operator class). You add these options when you create this= =20 object and you have a monopoly of defining options for it. Fabr=C3=ADzio offers adding options for relkind that already exists. This s= eems to=20 be a complex thing. You should resolve conflicts between two extensions tha= t=20 want to define same option for example. Somehow deal with the situation whe= n=20 the extension is dropped. Should we remove reloptions created by that=20 extension from pg_class then? And moreover, as far as I understand reloptions is about how does relation= =20 operates. And the external extension would not affect this at all. So we ar= e=20 speaking not about options of a relation, but about extension that want to= =20 store some info about some relation. I think in general this extension shou= ld=20 store it's info into it's own data structures.=20 May be there is cases when you will really need such behavior. But it is qu= ite=20 different task, have almost nothing in common with things I am going to do = :-) --=20 Nikolay Shaplov Postgres Professional: http://www.postgrespro.com Russian Postgres Company --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers