The /etc/init.d/postgresql script actually does an initdb for me.  Here is
a copy of that line from the script:

su -l postgres -s /bin/sh -c "/usr/bin/initdb --pgdata=/var/lib/pgsql/data
> /dev/null 2>&1" < /dev/null

After this line, it checks whether a PG_VERSION file exists in
/var/lib/pgsql/data and if not, it fails.  This is the failure I see.

If I run the above initdb command by hand without the redirction to
/dev/null I see the following message:

"The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

initdb:  The directory /var/lib/pgsql/data exists but is not empty.  If you
want
to create a new database system, either remove or empty the directory
/var/lib/pgsql/data or run initdb with an argument other than
/var/lib/pgsql/data."

The /var/lib/pgsql/data directory does have one file in it:  pg_hba.conf.
This file was present after my installation process, I didn't move it
there.

RH




                                                                                       
                                 
                    Hardy Merrill                                                      
                                 
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]           
                                 
                    om>                       cc:                                      
                                 
                    Sent by:                  Subject:     Re: Problems starting 
postgresql in RedHat 8.0               
                    redhat-list-admin@                                                 
                                 
                    redhat.com                                                         
                                 
                    No Phone Info                                                      
                                 
                    Available                                                          
                                 
                                                                                       
                                 
                    01/24/2003 08:35                                                   
                                 
                    AM                                                                 
                                 
                    Please respond to                                                  
                                 
                    redhat-list                                                        
                                 
                                                                                       
                                 
                                                                                       
                                 




Rebecca, I'm no Postgres expert, but I do use it.  I'm guessing
that you need to

  1. Log in to the 'postgres' account
  2. run 'initdb'
  3. then, as 'root' try to '/etc/init.d/postgres start'

initdb generally sets up your database instance - it creates
some necessary files and directories.  At a command prompt,
do a 'man initdb' to read about it.

Again I'm not sure this is your problem, but when I first install
postgres, it usually takes a few false starts until you finally
get all the prerequisites done.  Hopefully what I've outlined
above is all you need to do.

HTH.

--
Hardy Merrill
Senior Software Engineer
Red Hat, Inc.

[EMAIL PROTECTED] [[EMAIL PROTECTED]] wrote:
> Hi All,
>
> I just installed RedHat 8.0 on a system.  I receive a failure status when
I
> try to start the postrgresql server by doing the following command as
root:
>
> /etc/init.d/postgresql start
>
> It is failing because there is no PG_VERSION file at /var/lib/pgsql/data.
> In the data directory, there is only one file:  pg_hba.conf.
>
> Have something gone wrong in the installation process?  What can't I
start
> the postgresql server?
>
> Thanks!
> Rebecca



--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list





-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to