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

Поиск
Список
Период
Сортировка
От Shreesha
Тема Re: How to change the pgsql source code and build it??
Дата
Msg-id CAPBNhTx=CRdZzFrrV-rjHxGPRo8wxXBTcS0kbUGkK+u7cpS-Bw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to change the pgsql source code and build it??  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: How to change the pgsql source code and build it??
Re: How to change the pgsql source code and build it??
Список 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@2ndquadrant.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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: Set new system identifier using pg_resetxlog
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is analyze_new_cluster.sh still useful?