On Tue, Sep 23, 2014 at 4:29 PM, Mingzhe Li <mingzhe0...@gmail.com> wrote:
> I want to know what's the "core" function used in Postgres server? I am
> looking for something corresponding to main() in a simple C program. I want
> to know the file path and the function name. I am using Postgres 9.3.5,
> however I assume the "core" function will be unchanged between different
> revisions.
>
> Please let me know if you are confused by my question.

I think that the tcop is the closest thing to what you're looking for
(which includes postgres.c/PostgresMain()). There is a very simple
stub entry point ("main(int argc, char *argv[])") within main.c, too,
which is the real entry point.

Why not just set some breakpoints in a place that seems interesting
from within GDB, and inspect the call stack? That can be a useful
technique for gaining understanding of the structure of complicated
codebases that you're totally unfamiliar with.

-- 
Peter Geoghegan


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to