Re: On How To Shorten the Steep Learning Curve Towards PG Hacking... - Mailing list pgsql-hackers

From Kang Yuzhe
Subject Re: On How To Shorten the Steep Learning Curve Towards PG Hacking...
Date
Msg-id CAH=t1kr3Nx3w+dPxZBhE3BQP7_aP85UW_mXuX4OabnOOwbB7zA@mail.gmail.com
Whole thread Raw
In response to Re: On How To Shorten the Steep Learning Curve Towards PGHacking...  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Responses Re: On How To Shorten the Steep Learning Curve Towards PGHacking...  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
Thanks Tsunakawa for such an informative reply.

Almost all of the docs related to the internals of PG are of introductory concepts only.
There is even more useful PG internals site entitled "The Internals of PostgreSQL" in http://www.interdb.jp/pg/ translation of the Japanese PG Internals.

The query processing framework that is described in the manual as you mentioned is of informative and introductory nature.
In theory, the query processing framework described in the manual is understandable.

Unfortunate, it is another story to understand how query processing framework in PG codebase really works.
It has become a difficult task for me to walk through the PG source code for example how SELECT/INSERT/TRUNCATE in the the different modules under "src/..". really works.

I wish there were Hands-On with PostgreSQL Internals like https://bkmjournal.wordpress.com/2017/01/22/hands-on-with-postgresql-internals/ for more complex PG features.

For example, MERGE SQL standard is not supported yet by PG.  I wish there were Hands-On with PostgreSQL Internals for MERGE/UPSERT. How it is implemented in parser/executor/storage etc. modules with detailed explanation for each code and debugging and other important concepts related to system programming.
 
Zeray,
Regards



On Tue, Mar 28, 2017 at 6:04 AM, Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com> wrote:
From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Kang Yuzhe

> 1. Prepare Hands-on with PG internals
>
>
>  For example, a complete Hands-on  with SELECT/INSERT SQL Standard PG
> internals. The point is the experts can pick one fairly complex feature
> and walk it from Parser to Executor in a hands-on manner explaining step
> by step every technical detail.

I sympathize with you.  What level of detail do you have in mind?  The query processing framework is described in the manual:

Chapter 50. Overview of PostgreSQL Internals
https://www.postgresql.org/docs/devel/static/overview.html

More detailed source code analysis is provided for very old PostgreSQL 7.4, but I guess it's not much different now.  The document is in Japanese only:

http://ikubo.x0.com/PostgreSQL/pg_source.htm

Are you thinking of something like this?

MySQL Internals Manual
https://dev.mysql.com/doc/internals/en/





Regards
Takayuki Tsunakawa


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Proposal for changes to recovery.conf API
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [BUGS] Bug in Physical Replication Slots (at least9.5)?