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

From Shreesha
Subject Re: How to change the pgsql source code and build it??
Date
Msg-id CAPBNhTyW6KEdowG6w1DmcQxF4iNChQDGt__Erb08tSJoP5nuZw@mail.gmail.com
Whole thread Raw
In response to Re: How to change the pgsql source code and build it??  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Like Tom said, just setting the the configure option doesn't let the root user in. Looks like lot more changes are required.

Tom, according to you, what do you think would be my best bet to allow the root user initialize and start the database server?

Thanks,
Shreesha.


On Fri, Jun 13, 2014 at 9:43 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Fabrízio de Royes Mello <fabriziomello@gmail.com> writes:
> On Thu, Jun 12, 2014 at 10:59 PM, Kyotaro HORIGUCHI <
> horiguchi.kyotaro@lab.ntt.co.jp> wrote:
>> Try replacing these conditions with "(0 && geteuid() == 0)" and
>> you would see it run as root.

> Maybe a compile option like '--enable-run-as-root' could be added to allow
> it without the need of change the source code.

If we wanted it to be easy to run PG as root, those tests wouldn't be
there in the first place.  We don't want that, so there will never be
anything to override that policy as easily as setting a configure option.

In the case at hand, the OP wants to run on some weird system that
apparently doesn't have multiple users at all.  It's a pretty safe bet
that hacking out those geteuid tests is just the tip of the iceberg of
what he's going to have to change to make it work, because it probably
deviates from typical-Unix-environment in a lot of other ways too.
So I can't get too concerned about how easy this one aspect is for him.

                        regards, tom lane



--
~Shreesha.

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: ALTER TABLESPACE MOVE command tag tweak
Next
From: Tom Lane
Date:
Subject: Re: ALTER TABLESPACE MOVE command tag tweak