Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oonqv-0007VL-9K for pgsql-general@arkaria.postgresql.org; Sat, 29 Oct 2022 15:34:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oonqu-0001X2-5f for pgsql-general@arkaria.postgresql.org; Sat, 29 Oct 2022 15:34:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oonqt-0001RD-Qg for pgsql-general@lists.postgresql.org; Sat, 29 Oct 2022 15:34:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oonqr-0008UU-9G for pgsql-general@lists.postgresql.org; Sat, 29 Oct 2022 15:34:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 29TFYN2U015528; Sat, 29 Oct 2022 11:34:23 -0400 From: Tom Lane To: "jacktby@gmail.com" cc: pgsql-general Subject: Re: Does it equal to execute "CREATE ACCESS METHOD"? In-reply-to: <2022102923255412632450@gmail.com> References: <2022102923255412632450@gmail.com> Comments: In-reply-to "jacktby@gmail.com" message dated "Sat, 29 Oct 2022 23:25:56 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15526.1667057663.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 29 Oct 2022 11:34:23 -0400 Message-ID: <15527.1667057663@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "jacktby@gmail.com" writes: > When I add = > "{ oid =3D> '6015', oid_symbol =3D> 'SPB_AM_OID', > descr =3D> 'SPB index access method', > amname =3D> 'spb', amhandler =3D> 'spbhandler', amtype =3D> 'i' }," > in pg_am.dat > and add > "{ oid =3D> '388', descr =3D> 'spb index access method handler', > proname =3D> 'spbhandler', provolatile =3D> 'v', > prorettype =3D> 'index_am_handler', proargtypes =3D> 'internal', > prosrc =3D> 'spbhandler' }," in pg_proc.dat, > so when I use the make install && cd contrib;make install; > whether it equals to execute create access method? Did you run initdb afterwards? What you describe here should result in an updated postgres.bki file, but that isn't the same as catalog entries in a live database. > And Sorry for the another mail "access method xxx does not exist", you s= uggest me add new = > Am Index in contrib, But I need to modify gist to spb, so that's not my = require. And I need to know > add those in pg_proc.dat and pg_am.dat, if it won't create access method= for spb, what else I need to = > do? To be very blunt, it doesn't sound to me that your skills with Postgres are anywhere near up to the task of writing a new index access method. You should start with some less-ambitious project to gain some familiarity with the code base. regards, tom lane