Re: B tree index || function information
От | Amit Langote |
---|---|
Тема | Re: B tree index || function information |
Дата | |
Msg-id | CA+HiwqHMBGGT1uot4gTzKG9WvwQi+mxaVcEx5KuxnMM=1RbuSw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: B tree index || function information (Amit Langote <amitlangote09@gmail.com>) |
Список | pgsql-novice |
On Wed, Nov 20, 2013 at 1:49 PM, Amit Langote <amitlangote09@gmail.com> wrote: > Hi, > > On Tue, Nov 19, 2013 at 5:53 PM, Rohit Goyal <rhtgyl.87@gmail.com> wrote: >> Hi All, >> >> If we have a table and btree index on it. >> I would like to know what specific files and functions are called to insert >> data into index whenever I want to insert data into a table. >> >> For example, if I insert a anew row into a table, then a new row in index >> will be inserted. I would like to know the sequential flow of functions or >> files called to insert data into a btree. >> >> Please give me the flow for both an empty btree or an existing btree with >> (key, value) pairs. >> > > > As suggested elsewhere, it would be really helpful if you could learn > to use gdb for command line debugging and at least one command line > source code navigation tool like cscope. There are many online > resources for that. That way, you can easily follow what people here > on the mailing list might ask you to do like set a breakpoint in a > particular function as a starting point. Otherwise, I think it's > difficult for most people to create a flowchart (with references to > functions and files in which they are listed) or something like that. > Since, it appears you want to make some changes to the code, I think > understanding what's already going on with the help of debugging would > really help. > > To answer your specific question regarding empty and existing btree, I > guess you mean build a btree index by the first and insert a row into > a table with a btree index already present. > > 1) btbuild - builds a new btree index > 2) btinsert - insert an index tuple into a btree (from a comment in > the source code - Descend the tree recursively, find the appropriate > location for our new tuple, and put it there) > > And as for the file in which above functions are defined, here you go; src/backend/access/nbtree/nbtree.c -- Amit
В списке pgsql-novice по дате отправления: