Re: B tree index || function information

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Rohit Goyal <rhtgyl(dot)87(at)gmail(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: B tree index || function information
Date: 2013-11-20 04:55:35
Message-ID: CA+HiwqHMBGGT1uot4gTzKG9WvwQi+mxaVcEx5KuxnMM=1RbuSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, Nov 20, 2013 at 1:49 PM, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> Hi,
>
> On Tue, Nov 19, 2013 at 5:53 PM, Rohit Goyal <rhtgyl(dot)87(at)gmail(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Luca Ferrari 2013-11-20 07:22:42 Re: B tree index || function information
Previous Message Amit Langote 2013-11-20 04:49:27 Re: B tree index || function information