Thread: Bugs in PostgreSQL v7.1 rpms for RedHat
I have installed PostgreSQL v7.1 in RedHat from RPM's and I have find some bugs: Stopping the service: =============== When '/etc/rc.d/init.d/postgresql stop' try to stop 'postmaster' can't find the 'postmaster.pid' file, and don't stop the postmaster daemon. Y think it try to get in from $PGDATA/postmaster.pid , and it is locate in '/var/run/postmaster.pid', so it don't works. In the stop zone add: killall -TERM postmaster logs === The logs goes to /dev/null. change "pg_ctl > /dev/null" by "pg_ctl > var/log/postgresql" Access 'postmaster' through TCP/IP (it is not formerly a bug) ============================================ By default yo can't acces through TCP/IP, add this: -o '-i' then: pg_ctl -o '-i' Starting "PostgreSQL" when the server does. ================================ The installation script don't do this, you must do it if you wants that 'postmaster' starts when the server does. ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc3.d/S50postgresql ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc4.d/S50postgresql ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc5.d/S50postgresql ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc0.d/K25postgresql ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc1.d/K25postgresql ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc2.d/K25postgresql ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc6.d/K25postgresql ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ David Lizano - Director área técnica correo-e: david.lizano@izanet.com I Z A N E T - Servicios integrales de internet. web: http://www.izanet.com/ Dirección: C/ Checa, 57-59, 3º D - 50.007 Zaragoza (España) Teléfono: +34 976 25 80 23 Fax: +34 976 25 80 24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David Lizano wrote: > I have installed PostgreSQL v7.1 in RedHat from RPM's and I have find some > bugs: > Stopping the service: > =============== > When '/etc/rc.d/init.d/postgresql stop' try to stop 'postmaster' can't find > the 'postmaster.pid' file, and don't stop the postmaster daemon. > Y think it try to get in from $PGDATA/postmaster.pid , and it is locate in > '/var/run/postmaster.pid', so it don't works. Works here, for some reason. But I'll check it. I run these very RPM's on RH 6.2, 7.0, _and_ 7.1 and have not found this problem. But, I _will_ double check, and will issue a patch that still uses pg_ctl accordingly. > In the stop zone add: > killall -TERM postmaster I would _not_ do this. Use pg_ctl, as it is designed for the job. If a parameter needs to be changed, or a symlink made, then that's fine. But there are problems using killall for this purpose. > logs > === > The logs goes to /dev/null. Intentionally. > change "pg_ctl > /dev/null" > > by > "pg_ctl > var/log/postgresql" If you want rollable logging, enable syslog and friends in postgresql.conf, add the right line in syslog.conf, and restart postmaster. A redirected log such as the above will require a postmaster shutdown in order to roll. But, if you want to do that, it does work. > Access 'postmaster' through TCP/IP (it is not formerly a bug) > ============================================ > By default yo can't acces through TCP/IP, add this: > -o '-i' > then: > > pg_ctl -o '-i' Use the postgresql.conf file instead. This is intentional -- call it a bug if you wish, but it is an intentional change, and it is documented as such in README.rpm-dist, in the section entitled 'Grand Unified Configuration File', beginning on line 296. I am shipping the default postgresql.conf.sample, and am not patching it in any way shape or form, so that the main documentation will at least be correct here. Maybe I should have made the announcement state the change a little more clearly, though: but I figured people would read the documentation I took time to write. > Starting "PostgreSQL" when the server does. > ================================ > The installation script don't do this, you must do it if you wants that > 'postmaster' starts when the server does. > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc3.d/S50postgresql <snip> > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc6.d/K25postgresql Use /sbin/chkconfig --add postgresql--it's easier. The right information is set in the initscript for chkconfig usage. This used to be automatically done as part of the %post installation scriptlet -- I figured it's best to let the admin handle this, rather than make it automatic. It _is_ documented in README.rpm-dist, starting at line number 276. While README.rpm-dist might be a little hard to find on some systems, use 'rpm -ql postgresql | grep README\.rpm-dist' to find it, as it is part of the main RPM. Thanks much for taking the time to report these things. -- Lamar Owen WGCR Internet Radio 1 Peter 4:11
Ok, I have installed version 7.0.3 and 7.1 from RPM in Red Hat 6.2 (both in the same system), and I don't have had any trouble with the first one, but all this with the second one. >David Lizano wrote: > > I have installed PostgreSQL v7.1 in RedHat from RPM's and I have find some > > bugs: > > > Stopping the service: > > =============== > > When '/etc/rc.d/init.d/postgresql stop' try to stop 'postmaster' can't find > > the 'postmaster.pid' file, and don't stop the postmaster daemon. > > > Y think it try to get in from $PGDATA/postmaster.pid , and it is locate in > > '/var/run/postmaster.pid', so it don't works. > >Works here, for some reason. But I'll check it. I run these very RPM's >on RH 6.2, 7.0, _and_ 7.1 and have not found this problem. But, I _will_ >double check, and will issue a patch that still uses pg_ctl accordingly. > > > In the stop zone add: > > killall -TERM postmaster > >I would _not_ do this. Use pg_ctl, as it is designed for the job. If a >parameter needs to be changed, or a symlink made, then that's fine. But >there are problems using killall for this purpose. > > > logs > > === > > The logs goes to /dev/null. > >Intentionally. > > > change "pg_ctl > /dev/null" > > > > by > > "pg_ctl > var/log/postgresql" > >If you want rollable logging, enable syslog and friends in >postgresql.conf, add the right line in syslog.conf, and restart >postmaster. A redirected log such as the above will require a postmaster >shutdown in order to roll. But, if you want to do that, it does work. > > > Access 'postmaster' through TCP/IP (it is not formerly a bug) > > ============================================ > > By default yo can't acces through TCP/IP, add this: > > -o '-i' > > then: > > > > pg_ctl -o '-i' > >Use the postgresql.conf file instead. This is intentional -- call it a >bug if you wish, but it is an intentional change, and it is documented >as such in README.rpm-dist, in the section entitled 'Grand Unified >Configuration File', beginning on line 296. I am shipping the default >postgresql.conf.sample, and am not patching it in any way shape or form, >so that the main documentation will at least be correct here. Maybe I >should have made the announcement state the change a little more >clearly, though: but I figured people would read the documentation I >took time to write. > > > Starting "PostgreSQL" when the server does. > > ================================ > > The installation script don't do this, you must do it if you wants that > > 'postmaster' starts when the server does. > > > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc3.d/S50postgresql ><snip> > > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc6.d/K25postgresql > >Use /sbin/chkconfig --add postgresql--it's easier. The right information >is set in the initscript for chkconfig usage. This used to be >automatically done as part of the %post installation scriptlet -- I >figured it's best to let the admin handle this, rather than make it >automatic. It _is_ documented in README.rpm-dist, starting at line >number 276. > >While README.rpm-dist might be a little hard to find on some systems, >use 'rpm -ql postgresql | grep README\.rpm-dist' to find it, as it is >part of the main RPM. > >Thanks much for taking the time to report these things. >-- >Lamar Owen >WGCR Internet Radio >1 Peter 4:11 > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to majordomo@postgresql.org so that your >message can get through to the mailing list cleanly
[root@dgtao data]# /etc/rc.d/init.d/postgresql stop Stopping postgresql service: pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid Is postmaster running? [root@dgtao data]# Here too on my RedHat 6.2, but happens because I changed my postgres data dir to /home/postgres/data and there were a /var/lib/pgsql/base dir. Once I fixed the stop function, everything is fine : if [ -f /var/lib/pgsql/PG_VERSION ] && [ -d /var/lib/pgsql/base/template1 ] then export PGDATA=/home/postgres // I changed this else export PGDATA=/home/postgres/data // and this line fi ----- Original Message ----- From: David Lizano <david.lizano@izanet.com> To: <pgsql-admin@postgresql.org> Sent: Quinta-feira, 19 de Abril de 2001 17:28 Subject: Re: [ADMIN] Bugs in PostgreSQL v7.1 rpms for RedHat : Ok, : : I have installed version 7.0.3 and 7.1 from RPM in Red Hat 6.2 (both in : the same system), and I don't have had any trouble with the first one, but : all this with the second one. : : : >David Lizano wrote: : > > I have installed PostgreSQL v7.1 in RedHat from RPM's and I have find some : > > bugs: : > : > > Stopping the service: : > > =============== : > > When '/etc/rc.d/init.d/postgresql stop' try to stop 'postmaster' can't find : > > the 'postmaster.pid' file, and don't stop the postmaster daemon. : > : > > Y think it try to get in from $PGDATA/postmaster.pid , and it is locate in : > > '/var/run/postmaster.pid', so it don't works. : > : >Works here, for some reason. But I'll check it. I run these very RPM's : >on RH 6.2, 7.0, _and_ 7.1 and have not found this problem. But, I _will_ : >double check, and will issue a patch that still uses pg_ctl accordingly. : > : > > In the stop zone add: : > > killall -TERM postmaster : > : >I would _not_ do this. Use pg_ctl, as it is designed for the job. If a : >parameter needs to be changed, or a symlink made, then that's fine. But : >there are problems using killall for this purpose. : > : > > logs : > > === : > > The logs goes to /dev/null. : > : >Intentionally. : > : > > change "pg_ctl > /dev/null" : > > : > > by : > > "pg_ctl > var/log/postgresql" : > : >If you want rollable logging, enable syslog and friends in : >postgresql.conf, add the right line in syslog.conf, and restart : >postmaster. A redirected log such as the above will require a postmaster : >shutdown in order to roll. But, if you want to do that, it does work. : > : > > Access 'postmaster' through TCP/IP (it is not formerly a bug) : > > ============================================ : > > By default yo can't acces through TCP/IP, add this: : > > -o '-i' : > > then: : > > : > > pg_ctl -o '-i' : > : >Use the postgresql.conf file instead. This is intentional -- call it a : >bug if you wish, but it is an intentional change, and it is documented : >as such in README.rpm-dist, in the section entitled 'Grand Unified : >Configuration File', beginning on line 296. I am shipping the default : >postgresql.conf.sample, and am not patching it in any way shape or form, : >so that the main documentation will at least be correct here. Maybe I : >should have made the announcement state the change a little more : >clearly, though: but I figured people would read the documentation I : >took time to write. : > : > > Starting "PostgreSQL" when the server does. : > > ================================ : > > The installation script don't do this, you must do it if you wants that : > > 'postmaster' starts when the server does. : > : > > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc3.d/S50postgresql : ><snip> : > > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc6.d/K25postgresql : > : >Use /sbin/chkconfig --add postgresql--it's easier. The right information : >is set in the initscript for chkconfig usage. This used to be : >automatically done as part of the %post installation scriptlet -- I : >figured it's best to let the admin handle this, rather than make it : >automatic. It _is_ documented in README.rpm-dist, starting at line : >number 276. : > : >While README.rpm-dist might be a little hard to find on some systems, : >use 'rpm -ql postgresql | grep README\.rpm-dist' to find it, as it is : >part of the main RPM. : > : >Thanks much for taking the time to report these things. : >-- : >Lamar Owen : >WGCR Internet Radio : >1 Peter 4:11 : > : >---------------------------(end of broadcast)--------------------------- : >TIP 3: if posting/reading through Usenet, please send an appropriate : >subscribe-nomail command to majordomo@postgresql.org so that your : >message can get through to the mailing list cleanly : : : ---------------------------(end of broadcast)--------------------------- : TIP 5: Have you checked our extensive FAQ? : : http://www.postgresql.org/users-lounge/docs/faq.html :
----- Original Message ----- From: "Lamar Owen" <lamar.owen@wgcr.org> To: "David Lizano" <david.lizano@izanet.com> Cc: <pgsql-admin@postgresql.org> Sent: Thursday, April 19, 2001 7:29 PM Subject: Re: Bugs in PostgreSQL v7.1 rpms for RedHat > Works here, for some reason. But I'll check it. I run these very RPM's > on RH 6.2, 7.0, _and_ 7.1 and have not found this problem. But, I _will_ > double check, and will issue a patch that still uses pg_ctl accordingly. > (...) I agree, no problems on RH for me too. I agree with the default no networking conf and I think that with 7.1 there you do not need any more to set command line options ("-i"), now everything goes in the .conf file. I would rather set chkconfig to start a little bit later and to stop the service sooner in the shutdown, something like # chkconfig - 95 05 Then chkconfig --add could go in the rpm install script. Finally I did not find the new pg_restore tool for reloading databeses from new style dump archives. You can check with rpm -qil postgres-*|grep restore For this reason I had to recompile pgsql from scratch. I think it should go in the RPM packages. Thanks again to the RH packages maintainer. Jacopo
----- Original Message ----- From: "Lamar Owen" <lamar.owen@wgcr.org> To: "David Lizano" <david.lizano@izanet.com> Cc: <pgsql-admin@postgresql.org> Sent: Thursday, April 19, 2001 7:29 PM Subject: Re: Bugs in PostgreSQL v7.1 rpms for RedHat > Works here, for some reason. But I'll check it. I run these very RPM's > on RH 6.2, 7.0, _and_ 7.1 and have not found this problem. But, I _will_ > double check, and will issue a patch that still uses pg_ctl accordingly. > (...) I agree, no problems on RH for me too. I agree with the default no networking conf and I think that with 7.1 there you do not need any more to set command line options ("-i"), now everything goes in the .conf file. I would rather set chkconfig to start a little bit later and to stop the service sooner in the shutdown, something like # chkconfig - 95 05 Then chkconfig --add could go in the rpm install script. Finally I did not find the new pg_restore tool for reloading databeses from new style dump archives. You can check with rpm -qil postgres-*|grep restore For this reason I had to recompile pgsql from scratch. I think it should go in the RPM packages. Thanks again to the RH packages maintainer. Jacopo
I found that postgresql-perl installed plpgsql.so in /usr/lib, instead of /usr/lib/pgsql My import of a 7.0 database used pl/pgsql and it errored on import (psql xyz < dump) saying that /usr/lib/pgsql/plpgsql.so not found. For what it's worth. -dan "David Lizano" <david.lizano@izanet.com> wrote in message news:4.3.2.7.0.20010418231401.00bfbc10@mail.izanet.com... > > I have installed PostgreSQL v7.1 in RedHat from RPM's and I have find some > bugs: > > > > Stopping the service: > =============== > When '/etc/rc.d/init.d/postgresql stop' try to stop 'postmaster' can't find > the 'postmaster.pid' file, and don't stop the postmaster daemon. > > Y think it try to get in from $PGDATA/postmaster.pid , and it is locate in > '/var/run/postmaster.pid', so it don't works. > > In the stop zone add: > killall -TERM postmaster > > > logs > === > The logs goes to /dev/null. > > change "pg_ctl > /dev/null" > > by > "pg_ctl > var/log/postgresql" > > > Access 'postmaster' through TCP/IP (it is not formerly a bug) > ============================================ > By default yo can't acces through TCP/IP, add this: > -o '-i' > then: > > pg_ctl -o '-i' > > > Starting "PostgreSQL" when the server does. > ================================ > The installation script don't do this, you must do it if you wants that > 'postmaster' starts when the server does. > > > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc3.d/S50postgresql > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc4.d/S50postgresql > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc5.d/S50postgresql > > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc0.d/K25postgresql > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc1.d/K25postgresql > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc2.d/K25postgresql > ln -s /etc/rc.d/init.d/postgresql /etc/rc.d/rc6.d/K25postgresql > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > David Lizano - Director �rea t�cnica > correo-e: david.lizano@izanet.com > > I Z A N E T - Servicios integrales de internet. > web: http://www.izanet.com/ > Direcci�n: C/ Checa, 57-59, 3� D - 50.007 Zaragoza (Espa�a) > Tel�fono: +34 976 25 80 23 Fax: +34 976 25 80 24 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly