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

From: Shreesha <shreesha1988(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to change the pgsql source code and build it??
Date: 2014-06-18 17:50:59
Message-ID: CAPBNhTx=CRdZzFrrV-rjHxGPRo8wxXBTcS0kbUGkK+u7cpS-Bw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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
started and is up and running.

But, When I try to connect the client to the server, I am getting the
following error:
****************************************************
/switch/pgsql/bin # ./psql
FATAL: database "root" does not exist
psql: FATAL: database "root" does not exist
****************************************************
Upon browsing couple of links, I learned that in order to get through with
this issue, we should login with the actual postgres user so that it will
let the client to get connected with the default database. 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.

Can anyone shed some light on
1) when the default database gets created
2) how is this database 'name' is decided? Or what is the name of the
default database name?
3) Is there any other places in the database server code where this check
is applied?

Upon looking at the error I got, I believe the code is searching for the
database name == user name. If anyone can give some input on the code, it
would be helpful!

Thanks,
Shreesha

On Mon, Jun 16, 2014 at 6:58 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:

> 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 http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>

--
~Shreesha.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-06-18 17:54:16 Re: Is analyze_new_cluster.sh still useful?
Previous Message Abhijit Menon-Sen 2014-06-18 17:48:28 Re: Set new system identifier using pg_resetxlog