nemo

Following a Select Statement Through Postgres Internals

被刻印的时光 ゝ 提交于 2019-11-27 05:07:00
This is the third of a series of posts based on a presentation I did at the Barcelona Ruby Conference called “20,000 Leagues Under ActiveRecord.” (posts: one two and video ). Preparing for this presentation over the Summer, I decided to read through parts of the PostgreSQL C source code. I executed a very simple select statement and watched what Postgres did with it using LLDB, a C debugger. How did Postgres understand my query? How did it actually find the data I was looking for? This post is an informal journal of my trip through the guts of Postgres. I’ll describe the path I took and what I