From: | John Cheng <johnlicheng(at)gmail(dot)com> |
---|---|
To: | alexondi <alexondi(at)rambler(dot)ru> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: call initdb as regular user |
Date: | 2011-08-18 18:34:19 |
Message-ID: | CAJzZBASmsUAi2ZTGXUwGPwm_QeKOiR_5ZAo3PoJ5AL5VD+vz=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sure you can. The initdb command just sets up the directory you
specified and that's all it does. The files in the directory will be
created with that user's permission. So the directory you specify must
be accessible to that "regular user".
man page - http://linux.die.net/man/1/initdb
"Creating a database cluster consists of creating the directories in
which the database data will live..."
Be warned - The files are created with the user's permissions, which
mean you need to now start the postgres process (i.e., pg_ctl or
postmaster) as the SAME user. If you ran initdb as a regular then try
to start the database as "postgres", the attempt might fail due to
permission denied errors.
So you can do it, but it might not be what you are trying to do. Any
reason why you want to use a user that is not "postgres" (assuming
postgres is a system user you created specifically for running
PostgreSQL database)
On Thu, Aug 18, 2011 at 11:20 AM, alexondi <alexondi(at)rambler(dot)ru> wrote:
> Hi!
> Can I call initdb with some params as regular user (not root or postgres)?
> May I have some problem with replication, backup or with some other
> subsystem?
> Thank you!
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/call-initdb-as-regular-user-tp4712980p4712980.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
---
John L Cheng
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Chobot | 2011-08-18 18:46:41 | Re: Syncing Data to Production DB Server |
Previous Message | Peter Eisentraut | 2011-08-18 18:28:21 | Re: call initdb as regular user |