From: | Justin Clift <justin(at)postgresql(dot)org> |
---|---|
To: | vladimirg(at)rambler(dot)bg, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Bug #466: Unable to remove /root/tmp/initdb:xxxx.xxx |
Date: | 2001-09-22 14:58:14 |
Message-ID: | 3BACA706.95CBF4C9@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi Vladimir,
pgsql-bugs(at)postgresql(dot)org wrote:
>
> Vladimir Georgiev (vladimirg(at)rambler(dot)bg) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> Unable to remove /root/tmp/initdb:xxxx.xxx
This definitely sounds like a permissions problem.
> Long Description
> I've tried to follow the detailed description in INSTALL as for fresh install as long as it was possible.
>
> 0)My Linux box: Mandrake 8.0 for i586. Any RPMS concerning any RDBMSs were intentionally NOT installed during the Mandrake installation. PostgreSQL 7.1.3 source unpacked into /usr/src/postgresql-7.1.3. The root user enters this directory. Then:
It sounds like you're trying to say you are certain you don't have
PostgreSQL installed for the rest of this procedure. One thing I'll
point out is that in point 4) below, you show it won't add the user
"postgres" because that user exists already. In my experience with
Mandrake, if you have PostgreSQL (can't remember which RPM) already
installed then the "postgres" user is automatically added (by whichever
RPM it is), and also removed when the RPM version of PostgreSQL is
removed.
> 1)
> root# ./configure --with-perl --enable-odbc --enable-syslog
> Result: Worked fine
>
> 2)
> root# gmake
> Result: Worked fine
>
> 3)
> root# gmake install
> Result: Worked fine
>
> 4)
> root# adduser -r -d /dyn/pgsql/home postgres
> Result: Failed. User postgres already exists.
If you haven't ever manually created the "postgres" user, then I
strongly feel you have some kind of PostgreSQL RPM already present on
the system.
> 5)
> root# chown -R postgres.postgres *
> Result: Worked fine
>
> 6)
> user root edits /etc/ld.so.conf adding the line:
> /usr/local/pgsql
> Save the file and close it.
>
> 7)
> root# ldconfig
> Result: Worked fine
>
> 8)
> user root edits /etc/profile adding
> PATH=$PATH:/usr/local/pgsql/bin
> export $PATH
> MANPATH=$MANPATH:/usr/local/pgsql/man
> export $MANPATH
>
> 9)
> logout/login
> Result: System variables set fine
>
> 10)
> root# mkdir /dyn/pgsql
> root# mkdir /dyn/pgsql/data
> root# mkdir /dyn/pgsql/home
> root# chown -R postgres.postgres /dyn/pgsql
> Result: Worked fine
>
> 11)
> root# usermod -d /dyn/pgsql/home
> Result: Worked fine
>
> 12)
> root# su postgres
> Result: Worked fine
>
> 13)
> postgres$ /usr/local/pgsql/bin/initdb -D /dyn/pgsql/data
> Result: most of the script runs ok. At some point it said:
> ....... unable to remove /root/tmp/initdb:xxx.xxx
> where "xxx.xxx" are some numbers
> Result:Failed
> Observation: There are files created in /dyn/pgsql/data
>
> 14)
> postgres$ /usr/local/pgsql/bin/pg_ctl -D /dyn/pgsql/data -l /dyn/pgsql/home/server.log start
> Result: Failed. It said: Unable to remove /root/tmp/.....
> The server did not started.
>
> ======================================
> How did I workarounded the problem
> ======================================
>
> 1) I've opened /dyn/pgsql/data/postgresql.conf
> 2) I've Uncommented the line
> #unix_socket_directory=''
> so it became this:
> unix_socket_directory='/tmp'
> 3) I've saved the so edited postgresql.conf.
> 4)
> postgres$ /usr/local/pgsql/bin/pg_ctl -D /dyn/pgsql/data -l /dyn/pgsql/home/server.log start
>
> RESULT: NOW IT WORKS FINE :-)
From reading this, it looks like something is causing PostgreSQL to run
as the "postgres" user, but trying to install it's Unix Socket file in
the /root/tmp directory (where it doesn't have permission to put it).
That's why the error occurs.
> =========================================
> WHY do I think it's a bug
> =========================================
> Because I've followed the commands order recommended by the INSTALL file as long as it was possible.
> I've installed already about 4 prior versions of PostgreSQL, every time working this same way and never had this problem, every time working on some Mandrake distribution.
I strongly feel you already had/have some kind of PostgreSQL
installation on your system, and I would point the finger at that as
having caused or contributed to your problem.
Can you run :
rpm -q -a | grep post
and look for occurances of postgresql-xxxxx (or any other indications
of PostgreSQL), just to make sure?
:-)
Regards and best wishes,
Justin Clift
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
From | Date | Subject | |
---|---|---|---|
Next Message | Greg A. Woods | 2001-09-22 18:17:42 | time's running short for you to reserve 5432/tcp!!!! |
Previous Message | Justin Clift | 2001-09-22 12:06:01 | Re: WAL Log numbering |