Thread: Does it equal to execute "CREATE ACCESS METHOD"?
Sorry, I open another mail list to ask this question. When I add "{ oid => '6015', oid_symbol => 'SPB_AM_OID', descr => 'SPB index access method', amname => 'spb', amhandler => 'spbhandler', amtype => 'i' }," in pg_am.dat and add "{ oid => '388', descr => 'spb index access method handler', proname => 'spbhandler', provolatile => 'v', prorettype => 'index_am_handler', proargtypes => 'internal', prosrc => 'spbhandler' }," in pg_proc.dat, so when I use the make install && cd contrib;make install; whether it equals to execute create access method? by the way, I've added the spb codes in src/access/spb, so don't worry about the spbhandler. And Sorry for the another mail "access method xxx does not exist", you suggest 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? -------------- jacktby@gmail.com
I use pg16 source code.
jacktby@gmail.com
From: jacktby@gmail.comDate: 2022-10-29 23:25To: pgsql-generalSubject: Does it equal to execute "CREATE ACCESS METHOD"?div.FoxDIV_20221029232610322 { font-size: 10.5pt } Sorry, I open another mail list to ask this question.When I add"{ oid => '6015', oid_symbol => 'SPB_AM_OID',descr => 'SPB index access method',amname => 'spb', amhandler => 'spbhandler', amtype => 'i' },"in pg_am.datand add"{ oid => '388', descr => 'spb index access method handler',proname => 'spbhandler', provolatile => 'v',prorettype => 'index_am_handler', proargtypes => 'internal',prosrc => 'spbhandler' }," in pg_proc.dat,so when I use the make install && cd contrib;make install;whether it equals to execute create access method?by the way, I've added the spb codes in src/access/spb, so don't worry about the spbhandler.And Sorry for the another mail "access method xxx does not exist", you suggest me add newAm Index in contrib, But I need to modify gist to spb, so that's not my require. And I need to knowadd those in pg_proc.dat and pg_am.dat, if it won't create access method for spb, what else I need todo?--------------jacktby@gmail.com
"jacktby@gmail.com" <jacktby@gmail.com> writes: > When I add > "{ oid => '6015', oid_symbol => 'SPB_AM_OID', > descr => 'SPB index access method', > amname => 'spb', amhandler => 'spbhandler', amtype => 'i' }," > in pg_am.dat > and add > "{ oid => '388', descr => 'spb index access method handler', > proname => 'spbhandler', provolatile => 'v', > prorettype => 'index_am_handler', proargtypes => 'internal', > prosrc => '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 suggest 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
thanks for your advice, yes I'm confused with my studying ways. Can you give me some like less-ambitious projects to study it?
jacktby@gmail.com
From: Tom LaneDate: 2022-10-29 23:34CC: pgsql-generalSubject: Re: Does it equal to execute "CREATE ACCESS METHOD"?div.FoxDIV_20221029233749611 { font-size: 10.5pt } "jacktby@gmail.com" <jacktby@gmail.com> writes:> When I add> "{ oid => '6015', oid_symbol => 'SPB_AM_OID',> descr => 'SPB index access method',> amname => 'spb', amhandler => 'spbhandler', amtype => 'i' },"> in pg_am.dat> and add> "{ oid => '388', descr => 'spb index access method handler',> proname => 'spbhandler', provolatile => 'v',> prorettype => 'index_am_handler', proargtypes => 'internal',> prosrc => '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 shouldresult in an updated postgres.bki file, but that isn't thesame as catalog entries in a live database.> And Sorry for the another mail "access method xxx does not exist", you suggest 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 withPostgres are anywhere near up to the task of writing a newindex access method. You should start with some less-ambitiousproject to gain some familiarity with the code base.regards, tom lane
thanks for your advice, I realize my problems, can you give me some materials like some study routine for pg-internal? -------------- jacktby@gmail.com >"jacktby@gmail.com" <jacktby@gmail.com> writes: >> When I add >> "{ oid => '6015', oid_symbol => 'SPB_AM_OID', >> descr => 'SPB index access method', >> amname => 'spb', amhandler => 'spbhandler', amtype => 'i' }," >> in pg_am.dat >> and add >> "{ oid => '388', descr => 'spb index access method handler', >> proname => 'spbhandler', provolatile => 'v', >> prorettype => 'index_am_handler', proargtypes => 'internal', >> prosrc => '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 suggest 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