Thanks to everyone for the help.  Everything is working although I am not
sure what caused my original problem.  I removed the /var/lib/pgsql/data
dir, erased the postgresql RPMs, installed them again, ran an initdb and
things are working fine now.



                                                                                       
                            
                    Hardy Merrill                                                      
                            
                    <hmerrill@red        To:     [EMAIL PROTECTED]          
                            
                    hat.com>             cc:     [EMAIL PROTECTED], 
[EMAIL PROTECTED]                       
                    No Phone Info        Subject:     Re: Problems starting postgresql 
in RedHat 8.0               
                    Available                                                          
                            
                                                                                       
                            
                    01/24/2003                                                         
                            
                    11:41 AM                                                           
                            
                                                                                       
                            
                                                                                       
                            




[EMAIL PROTECTED] [[EMAIL PROTECTED]] wrote:
>
> 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.

I have a stable database installation, so I can't try 'initdb'
again, but I did find this in the /usr/bin/initdb script at
line 466:

Top level PG_VERSION is checked by bootstrapper, so make it first
echo "$short_version" > "$PGDATA/PG_VERSION" || exit_nicely

The only reason I can think of off-the-top-of-my-head that could
cause that to fail would be permissions on the postgres data
directory.  Is your data directory owned by 'postgres', or some
other user(root?)?

If you can, I'd try removing the var/lib/pgsql/data directory and as
user 'postgres' try running 'initdb' again.

Hardy Merrill

>
> 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





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

Reply via email to