Re: Starting postmaster problem

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Bogdan Paduraru <bpaduraru(at)petar(dot)ro>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Starting postmaster problem
Date: 2000-11-01 23:10:44
Message-ID: 200011012310.eA1NAjl31990@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Bogdan Paduraru wrote:
>Hello,
>I installed Postgresql 7.0.2 on a Redhat Linux 6.1 and I want now to run
>it, but it seems I have a problem.
>I connected as root on my server.
>After that I do :
>$ su postgres
>$nohup /usr/local/pgsql/data \ </dev/null >>server.log 2>>1 &
>After the second command I get
>bash : server.log: Permission denied
>Can you help me?

Several things:

1. /usr/local/pgsql/data is a directory, not a command; it's not at all
clear what you are trying to do here. I suppose you want to run the
postmaster: `/usr/local/pgsql/bin/postmaster >>server.log 2>>1', but
you need to specify some options or define some environment
variables (see the documentation!)

2. `su postgres' will not change directory for you, so you will still
be in the directory where you issued the su command; however you
are now user postgres and postgres doesn't have write permission
in the current directory. If you use `su - postgres' you will not
only become user postgres but you will be put in the postgres home
directory, where you presumably will have write permission.

3. nohup does not need to be used to run the postmaster, which disconnects
itself from the terminal. In fact, running nohup is probably a bad
idea, at least on Linux, because it nices the process down, which
will slow down query processing by the backend.

>And another thing : how can I make it to run when I start my Linux
>server?

Define a script under /etc/rc.d (I think that's right for Red Hat).
Look at the documentation for init for a description of what happens
at boot time.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"But they that wait upon the LORD shall renew their
strength; they shall mount up with wings as eagles;
they shall run, and not be weary; and they shall walk,
and not faint." Isaiah 40:31

Browse pgsql-admin by date

  From Date Subject
Next Message Robin's Postgres List Archive 2000-11-02 23:17:07 Unfamiliar SQL Exceptions
Previous Message Bogdan Paduraru 2000-11-01 20:32:34 JDBC make problem