How to change the pgsql source code and build it?? - Mailing list pgsql-hackers

From Shreesha
Subject How to change the pgsql source code and build it??
Date
Msg-id CAPBNhTwMj3ydw7VmBFa-cp5w-D2VH10NX5Q5HKzNeSgnMcDFSg@mail.gmail.com
Whole thread Raw
Responses Re: How to change the pgsql source code and build it??  (Abhijit Menon-Sen <ams@2ndquadrant.com>)
Re: How to change the pgsql source code and build it??  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Hello,
I need to initialize the db as the root and start the database server. In order to accomplish this, I modified the initdb.c source file of pgsql package and tried to compile it. Eventhough the build was successful, I couldn't see the root user able to execute initdb executable generated by the build. I wanted to know if there is any other procedure for building the postgresql procedure?

Thanks 
Shreesha.

P.S
Below is the changes done in initdb.c (shown in bold letters below)
-------------------------------------------------------------------------------------------------------------------------------
static char *
get_id(void)
{
#ifndef WIN32

        struct passwd *pw;

//      if (geteuid() == 0)                     /* 0 is root's uid */
/*      {
                fprintf(stderr,
                                _("%s: cannot be run as root\n"
                                  "Please log in (using, e.g., \"su\") as the "
                                  "(unprivileged) user that will\n"
                                  "own the server process.\n"),
                                progname);
                exit(1);
        }
*/
...
}

pgsql-hackers by date:

Previous
From: Gregory Smith
Date:
Subject: Re: API change advice: Passing plan invalidation info from the rewriter into the planner?
Next
From: Stephen Frost
Date:
Subject: Re: API change advice: Passing plan invalidation info from the rewriter into the planner?