From: | hom <obsidianhom(at)gmail(dot)com> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: I am confused after reading codes of PostgreSQL three week |
Date: | 2011-03-18 14:15:58 |
Message-ID: | AANLkTim94S-p-8JG-2V_dXPqYNeTo=h8gn7oAZ1EEmW2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2011/3/17 Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>:
> hom <obsidianhom(at)gmail(dot)com> wrote:
>
>> I try to known how a database is implemented and I have been
>> reading PG source codes for a month.
>
> That's ambitious.
>
> find -name '*.h' -or -name '*.c' \
> | egrep -v '^\./src/test/.+/tmp_check/' \
> | xargs cat | wc -l
> 1059144
>
> Depending on how you do the math, that's about 50,000 lines of code
> per day to get through it in the time you mention.
>
>> Is there any article or some way could help understand the source
>> code ?
>
> Your best bet would be to follow links from the Developers tab on
> the main PostgreSQL web site:
>
> http://www.postgresql.org/developer/
>
> In particular the Developer FAQ page:
>
> http://wiki.postgresql.org/wiki/Developer_FAQ
>
> And the "Coding" links:
>
> http://www.postgresql.org/developer/coding
>
> may help.
>
> Before reading code in a directory, be sure to read any README
> file(s) in that directory carefully.
>
> It helps to read this list.
>
> In spite of reviewing all of that myself, it was rather intimidating
> when I went to work on a major patch 14 months ago. Robert Haas
> offered some good advice which served me well in that effort --
> divide the effort in to a series of incremental steps, each of which
> deals with a small enough portion of the code to get your head
> around. As you work in any one narrow area, it becomes increasingly
> clear; with that as a base you can expand your scope.
>
> When you're working in the code, it is tremendously helpful to use
> an editor with ctags support (or similar IDE functionality).
>
> I hope this is helpful. Good luck.
>
> -Kevin
>
Thanks Kevin.
I will follow your advice and I will also post the question to the
mail list for help.
Thanks a lot.
--
Best Wishes!
hom
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-03-18 14:16:55 | Re: FK constraints "NOT VALID" by default? |
Previous Message | hom | 2011-03-18 14:10:29 | Re: I am confused after reading codes of PostgreSQL three week |