[Users] About owner of postgres
Itamar Heim
iheim at redhat.com
Sun Nov 11 11:24:56 UTC 2012
On 11/11/2012 01:23 PM, Stephen Liu wrote:
>> From: Itamar Heim <iheim at redhat.com>
>> To: Stephen Liu <satimis at yahoo.com>
>> Cc: Juan Hernandez <jhernand at redhat.com>; "users at ovirt.org" <users at ovirt.org>
>> Sent: Sunday, November 11, 2012 6:57 PM
>> Subject: Re: [Users] About owner of postgres
>>
> - snip -
>
>
>>> A further question;
>>>
>>> I can change the owner of postgresql in following ways;
>>>
>>> 1)
>>> # chown satimis satimis /var/lib/pgsql/
>>>
>>>
>>> OR
>>> 2)
>>> sudo su - postgres
>>> initdb -E UTF8
>>>
>>> $ createuser -s -U postgres
>>> $ Enter name of role to add: {{ satimis }}
>>>
>>>
>>> Would there is any difference?
>>>
>>> If there is. After having finished the current test I can start a new test
>> on another hard drive.
>>>
>>>
>>> Besides:
>>> on
>>> http://wiki.ovirt.org/wiki/Installing_PostgreSQL_DB
>>> Connecting to the database
>>>
>>> Run /etc/init.d/postgresql restart (it didn't work)
>>>
>>> to be replaced with:
>>> service postgresql restart
>>> _______________________________________________
>>> Users mailing list
>>> Users at ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>>
>>
>> i may have missed this, but why are you trying to change the owner of
>> postgres?
>
> On my previous posting I was stuck there.
>
>> I was stuck here;
>>
>> # su - postgres -c 'pg_ctl initdb'
>> The files belonging to this database system will be owned by user
>> "postgres".
>> This user must also own the server process.
>>
>> The database cluster will be initialized with locale en_US.UTF-8.
>> The default database encoding has accordingly been set to UTF8.
>> The default text search configuration will be set to "english".
>>
>> initdb: directory "/var/lib/pgsql/data" exists but is not empty
>> If you want to create a new database system, either remove or empty
>> the directory "/var/lib/pgsql/data" or run initdb
>> with an argument other than "/var/lib/pgsql/data".
>> pg_ctl: database system initialization failed
>
> pgsql was owned by postgres not by user nor root
just thinking - assuming that's the default, we should be able to work
with it, or have changing it as part of our build notes.
More information about the Users
mailing list