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

2014-06-23 Thread Kyotaro HORIGUCHI
Hello, I don't know you environment so I don't see how many additional changes are needed, but still I think the message should not be seen there. @Fabrizio de Royes Mello, Even upon making changes as per your suggestion, I could see that initdb is failing for the same reason:

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

2014-06-20 Thread Merlin Moncure
On Wed, Jun 18, 2014 at 12:50 PM, Shreesha shreesha1...@gmail.com wrote: Well, the initdb issue looks to be resolved. Actually, after making the changes as suggested by Kyotaro Horiguchi, I copied only initdb binary to my platform and didn't copy all of them. Hence, the dependencies were still

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

2014-06-18 Thread Shreesha
Well, the initdb issue looks to be resolved. Actually, after making the changes as suggested by Kyotaro Horiguchi, I copied only initdb binary to my platform and didn't copy all of them. Hence, the dependencies were still not resolved and was getting the error. However, now the database server is

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

2014-06-18 Thread Craig Ringer
On 06/19/2014 01:50 AM, Shreesha wrote: However in my case, I don't know why there wasn't a default database with name 'root' got created or why the server rejects the client when it tries to connect to the default database. Take a look at the initdb manual, the tutorial, and the

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

2014-06-16 Thread Shreesha
@Craig Ringer, I am afraid I didn't understand your solution. The scenario I am having is a system which has only user as root. I have all the permissions and privileges of the system as the user is root. But pgsql doesn't allow initdb to be executed by root. I think the solution you proposed

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

2014-06-16 Thread Shreesha
@Craig Ringer, I am afraid I didn't understand your solution. The scenario I am having is a system which has only user as root. I have all the permissions and privileges of the system as the user is root. But pgsql doesn't allow initdb to be executed by root. I think the solution you proposed

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

2014-06-16 Thread Craig Ringer
On 06/17/2014 02:02 AM, Shreesha wrote: But I believe, I am looking forward for the exact opposite of it. In other words, a possible work around for a root user to execute certain executable(s) as an unprivileged user. So you want the su or sudo commands? -- Craig Ringer

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

2014-06-15 Thread Craig Ringer
On 06/13/2014 07:08 AM, Shreesha wrote: I need to initialize the db as the root and start the database server Assuming there's no way around doing this (it's generally not a good idea), you can just use the simple program 'fakeroot'. This program changes the return values from system calls via

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

2014-06-13 Thread Fabrízio de Royes Mello
On Thu, Jun 12, 2014 at 10:59 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Hi, I need to port pgsql onto a controller which doesn't have a framework of creating multiple users for administrative purposes. The entire controller is managed by a single root user and that is

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

2014-06-13 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Thu, Jun 12, 2014 at 10:59 PM, Kyotaro HORIGUCHI horiguchi.kyot...@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

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

2014-06-13 Thread Shreesha
@Fabrizio de Royes Mello, Even upon making changes as per your suggestion, I could see that initdb is failing for the same reason: *** /mswitch/pgsql/bin # ./initdb -D ../data/ The files

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

2014-06-13 Thread Shreesha
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

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

2014-06-12 Thread Abhijit Menon-Sen
At 2014-06-12 16:08:05 -0700, shreesha1...@gmail.com wrote: I need to initialize the db as the root and start the database server. Why? -- Abhijit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

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

2014-06-12 Thread Shreesha
I need to port pgsql onto a controller which doesn't have a framework of creating multiple users for administrative purposes. The entire controller is managed by a single root user and that is the reason I am trying to change the pgsql initdb behavior. Do you think of any other better alternative?

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

2014-06-12 Thread Kyotaro HORIGUCHI
Hi, I need to port pgsql onto a controller which doesn't have a framework of creating multiple users for administrative purposes. The entire controller is managed by a single root user and that is the reason I am trying to change the pgsql initdb behavior. Do you think of any other better