Thread: Stuck at the starting gate

Stuck at the starting gate

From
Rich Shepard
Date:
  I wiped out the RH packages for -7.2.1 and built/installed -7.3.2 from
source. Postmaster is running on the backend, but I cannot successfully add
me as a user nor run initdb. I'm looking at the 7.2 tutorial pdf and don't
see there where I went wrong. Here are some results:

[postgres@salmo /home/rshepard]$ createuser rshepard
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
ERROR:  'autocommit' is not a valid option name
createuser: creation of user "rshepard" failed

[postgres@salmo /home/rshepard]$ initdb -D
/home/rshepard/development/paisley/
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 C.

creating directory /home/rshepard/development/paisley/... mkdir: cannot
create directory /home/rshepard/development/paisley': Permission denied

initdb failed.

----------------------------------

  I had no problems with earlier versions so I'm rather at a loss here to
know what to do to get postgres up and running again.

Suggestions greatly appreciated,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                         http://www.appl-ecosys.com/


Re: Stuck at the starting gate

From
Tom Lane
Date:
Rich Shepard <rshepard@appl-ecosys.com> writes:
>   I wiped out the RH packages for -7.2.1 and built/installed -7.3.2 from
> source. Postmaster is running on the backend, but I cannot successfully add
> me as a user nor run initdb. I'm looking at the 7.2 tutorial pdf and don't
> see there where I went wrong. Here are some results:

> [postgres@salmo /home/rshepard]$ createuser rshepard
> Shall the new user be allowed to create databases? (y/n) y
> Shall the new user be allowed to create more new users? (y/n) y
> ERROR:  'autocommit' is not a valid option name
> createuser: creation of user "rshepard" failed

It looks to me like you have 7.3 createuser script talking to a 7.2 (or
even earlier) backend.  Better double-check what you wiped out and what
you still have.


> [postgres@salmo /home/rshepard]$ initdb -D
> /home/rshepard/development/paisley/
> 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 C.

> creating directory /home/rshepard/development/paisley/... mkdir: cannot
> create directory /home/rshepard/development/paisley': Permission denied

> initdb failed.

This seems clear enough: user postgres doesn't own user rshepard's
directories, hm?

            regards, tom lane

Re: Stuck at the starting gate

From
Rich Shepard
Date:
On Mon, 10 Mar 2003, Tom Lane wrote:

> It looks to me like you have 7.3 createuser script talking to a 7.2 (or
> even earlier) backend.  Better double-check what you wiped out and what
> you still have.

Tom,

  There were no files 'postgres*' when I got done; I also checked for pg*
and cleaned those out, too. But, ... I think it is a permissions problem for
the initdb, at least.

  I found a couple of stale lockfiles and deleted those. Now the command,
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data &
works.

  Do I want a copy of that in /etc/rc.d/rc.local so that the postmaster will
restart upon reboot?

  Now that initdb has successfully run I'll try createuser again.

Thanks very much,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                         http://www.appl-ecosys.com/