Re: How to startup the database server?

From: Jan Kesten <jan(at)dafuer(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to startup the database server?
Date: 2012-12-20 06:42:43
Message-ID: 50D2B363.2070105@dafuer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Jason,

sounds a bit weird. Can you check which user the database files belong
to? A 'ls -lah /var/lib/pgsql' should do the job. Then switch from root
user to the postgresql user and try to start the cluster manually with
the command line from below (put from your message):

/usr/bin/postgres -D /var/lib/pgsql/data

That sould start your instance in foreground so you should see any
errors and messages during startup.

One more thing: is SELinux enabled?

Hope that helps :-)
Jan

On 19.12.2012 16:34, Jason Ma wrote:
> Hi,
> The ps output is after the server start, I don't know why I can't see
> any process after start the server. And of course I use root to initial
> db, 'cause we have to run this command in CentOS which you need the
> privilege of root.
>
> service postgresql start
>
> Regards,
> Jason
>
>
> 2012/12/19 Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com
> <mailto:adrian(dot)klaver(at)gmail(dot)com>>
>
> On 12/19/2012 07:07 AM, Jason Ma wrote:
>
> Thanks, adrian, but I have check the pgstartup.log, I got the
> following
> messages:
> .....
> creating information schema ... ok
> vacuuming database template1 ... ok
> copying template1 to template0 ... ok
> copying template1 to postgres ... ok
>
> Success. You can now start the database server using:
>
> /usr/bin/postgres -D /var/lib/pgsql/data
> or
> /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start
>
> runuser: cannot set groups: Operation not permitted
>
>
> Seems the database cluster was initialized. Sort of concerned by the
> runuser error. What user did you run the initdb as?
>
>
>
> I tried this:
>
> -bash-4.1$ /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start
> server starting
>
>
> Nothing in the logfile?
>
>
> -bash-4.1$ ps -ef |grep postgres
> root 2904 2585 0 22:59 pts/1 00:00:00 su - postgres
> postgres 2905 2904 0 22:59 pts/1 00:00:00 -bash
> postgres 2946 2905 7 23:00 pts/1 00:00:00 ps -ef
> postgres 2947 2905 0 23:00 pts/1 00:00:00 grep postgres
>
> It reported that I have started the server but that doesn't work, I
> think there must be somebody has the same problem with me. Any
> suggestions.
>
>
> I am not seeing the server running in the above. You might want to
> retry the ps with post as the grep expression.
>
>
> Regards,
> Jason
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com <mailto:adrian(dot)klaver(at)gmail(dot)com>
>
>
>
>
> --
> Best wishes,
>
> Jason Ma

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Pašić 2012-12-20 07:59:39 server registration problems
Previous Message Groshev Andrey 2012-12-20 05:30:40 Re: [GENERAL] trouble with pg_upgrade 9.0 -> 9.1