Re: How to change the pgsql source code and build it??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: fabriziomello(at)gmail(dot)com
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, shreesha1988(at)gmail(dot)com, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to change the pgsql source code and build it??
Date: 2014-06-13 16:43:22
Message-ID: 28620.1402677802@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= <fabriziomello(at)gmail(dot)com> writes:
> On Thu, Jun 12, 2014 at 10:59 PM, Kyotaro HORIGUCHI <
> horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-06-13 17:01:27 Re: unable to attach client process to postgresql server using gdb
Previous Message Fabrízio de Royes Mello 2014-06-13 16:28:32 Re: How to change the pgsql source code and build it??