Thread: Problem starting postgresql
I have just installed PostgreSQL7.1.2. I am running Red Hat 7.1 I uninstalled the PostgreSQL distribution 7.0x which came together with it using RPM. I downloaded the RPMs for PostgreSQL7.1.2 using RPM. I started the postgresql service by typing /etc/rc.d/init.d/postgresql start. The command successfully starts up the service. The problem comes after this. If I try to login to any database using psql, it works fine and has no complaints. But when I tried to access the database using the GUI client pgacess, it fails with the error message "ConnectDBStart()--connect..." and prompts me to check if the postmaster is started with -i option. Even when I write a java client to connect to the database through postgresql's jdbc, it fails with the same error.
So I tried to start postmaster through command line by typing /usr/bin/posmaster -i -D /var/lib/pgsql/data. This starts the database as usual. I can connect to the database through psql, pgacess and a java cliet.Fine, now you may wonder what's the problem. The problem is how do I add this into the postgres service startup script which is in /etc/rc.d/init.d/postgresql. I tried adding the "-i" near the postmaster startup command within the script but when I run it by typing postgresql start, it fails.
Can anyone please let me know how and where should I place the "-i" argument in the postgresql script? I will be eagerly awaitng a reply..
Cheers
Selvam
OK Selvam: I'm not just a teatcher, so I'm going to tell you the way I've used: You should make a little script called 'postgres', and put it into /etc/rc.d/init.d/ directory This script ('postgres') says so: su - 'postgres' -c 'postmaster -i -o -F &'> /home/postgres/pgsql/server.log 2>& (in your case maybe " /var/lib/pgsql/server.log ") Once done it, you must make into /etc/rc.d/init.d/rc2.d/- a link (ln -s) called 'S98postgres' to this script /etc/rc.d/init.d/postgres). Make this link into /etc/rc.d/init.d/rc2.d if you start your Linux in mode console -mode 2- Hope it can help you... Cheers Sam ecaillava@interlap.com.ar SELVAM WROTE: Mensaje citado por: Selvam <selvam@netwxs.com.my>: > I have just installed PostgreSQL7.1.2. I am > running Red Hat 7.1 I uninstalled the PostgreSQL > distribution 7.0x which came together with it > using RPM. I downloaded the RPMs for > PostgreSQL7.1.2 using RPM. I started the > postgresql service by typing > /etc/rc.d/init.d/postgresql start. The command > successfully starts up the service. The problem > comes after this. If I try to login to any > database using psql, it works fine and has no > complaints. But when I tried to access the > database using the GUI client pgacess, it fails > with the error message > "ConnectDBStart()--connect..." and prompts me to > check if the postmaster is started with -i > option. Even when I write a java client to > connect to the database through postgresql's > jdbc, it fails with the same error. > > So I tried to start postmaster through command > line by typing /usr/bin/posmaster -i -D > /var/lib/pgsql/data. This starts the database as > usual. I can connect to the database through > psql, pgacess and a java cliet.Fine, now you may > wonder what's the problem. The problem is how do > I add this into the postgres service startup > script which is in /etc/rc.d/init.d/postgresql. > I tried adding the "-i" near the postmaster > startup command within the script but when I run > it by typing postgresql start, it fails. > > Can anyone please let me know how and where > should I place the "-i" argument in the > postgresql script? I will be eagerly awaitng a > reply.. > > Cheers > > Selvam > ================================================================================= Enviado via http://www.interlap.com.ar - Tu Email POP3 Gratis Ademas : programas, chat, letras de canciones, noticias y mucho mas Muda tu sitio a interlap ahora y obtene un 20% de descuento y un mes de Publicidad Gratis ================================================================================= Sender-IP: 200.45.176.56
dear ryan,
it works now..
thank you very much, really appreciate your help.
selvam
----- Original Message -----From: Ryan C. BonhamTo: SelvamSent: Friday, July 27, 2001 5:10 AMSubject: RE: [ADMIN] Problem starting postgresqlEdit the postmaster.conf file located in your /var/lib/pgsql/data directory. The line reads# TCPIP_SOCKETS = Falsechange it toTCPIP_SOCKETS = TrueRyan-----Original Message-----
From: Selvam [mailto:selvam@netwxs.com.my]
Sent: Friday, July 27, 2001 2:21 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Problem starting postgresqlI have just installed PostgreSQL7.1.2. I am running Red Hat 7.1 I uninstalled the PostgreSQL distribution 7.0x which came together with it using RPM. I downloaded the RPMs for PostgreSQL7.1.2 using RPM. I started the postgresql service by typing /etc/rc.d/init.d/postgresql start. The command successfully starts up the service. The problem comes after this. If I try to login to any database using psql, it works fine and has no complaints. But when I tried to access the database using the GUI client pgacess, it fails with the error message "ConnectDBStart()--connect..." and prompts me to check if the postmaster is started with -i option. Even when I write a java client to connect to the database through postgresql's jdbc, it fails with the same error.So I tried to start postmaster through command line by typing /usr/bin/posmaster -i -D /var/lib/pgsql/data. This starts the database as usual. I can connect to the database through psql, pgacess and a java cliet.Fine, now you may wonder what's the problem. The problem is how do I add this into the postgres service startup script which is in /etc/rc.d/init.d/postgresql. I tried adding the "-i" near the postmaster startup command within the script but when I run it by typing postgresql start, it fails.Can anyone please let me know how and where should I place the "-i" argument in the postgresql script? I will be eagerly awaitng a reply..CheersSelvam