On Wed, Sep 24, 2014 at 8:29 AM, Mingzhe Li <mingzhe0...@gmail.com> wrote: > Hi experts, > > 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. Er... Your question is rather unclear by using the term "core", making it difficult to answer actually. Now, on this mailing list, you may find Postgres "core" as defined as what is roughly produced by the PostgreSQL central git repository in terms of binaries and libraries for a huge set of platforms: http://git.postgresql.org/gitweb/?p=postgresql.git. This "core" is divided into many things: - backend, the part postgres server itself is run - contrib, a set of extra utilities not mandatory for the backend - client utilities, like pg_dump, etc. - common libraries shared between backend and client.
In your question, it seems that you are looking for the main() call for the binary postgres, which is located in src/backend/main/main.c. At the bottom of main() you'll see as well a set of functions like PostmasterMain or PostgresMain that really define the startup path used. PostmasterMain for example starts the postmaster, that is then able to itself start backend process through PostgresMain()... pgsql-hackers is as well a mailing list where people have technical discussions about features and patches, hence your question would be more adapted for pgsql-novice or pgsql-general. Thanks, -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers