Thread: Problems With -9.0.1
I built and installed -9.0.1 on my Slackware-13.1 server and it ran for a while. Now, without warning, one of my applications dependent upon postgres won't run. While trying to restart postgres I learned the .pid file did not exist so I removed /tmp/.s.PGSQL* and tried to restart postgres. Here's what I see: postgres@salmo:$ postgres -D /usr/local/pgsql/data & [1] 16044 postgres@salmo:/var/log/httpd$ LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory WARNING: could not open directory "/share/timezonesets": No such file or directory HINT: This may indicate an incomplete PostgreSQL installation, or that the file "/bin/postgres" has been moved away from its proper location. FATAL: invalid value for parameter "timezone_abbreviations": "Default" The files and directories are in /usr/local/pgsql/share: postgres@salmo:$ ls /usr/local/pgsql/share/ conversion_create.sql postgres.bki sql_features.txt doc/ postgres.description system_views.sql information_schema.sql postgres.shdescription timezone/ man/ postgresql.conf.sample timezonesets/ pg_hba.conf.sample psqlrc.sample tsearch_data/ pg_ident.conf.sample recovery.conf.sample unknown.pltcl pg_service.conf.sample snowball_create.sql What do I do to overcome this impasse and get postgres running again? Rich
On Monday 20 December 2010 5:09:24 pm Rich Shepard wrote: > I built and installed -9.0.1 on my Slackware-13.1 server and it ran for > a while. Now, without warning, one of my applications dependent upon > postgres won't run. While trying to restart postgres I learned the .pid > file did not exist so I removed /tmp/.s.PGSQL* and tried to restart > postgres. > > Here's what I see: > > postgres@salmo:$ postgres -D /usr/local/pgsql/data & > [1] 16044 > postgres@salmo:/var/log/httpd$ LOG: could not open directory > "/share/timezone": No such file or directory > LOG: could not open directory "/share/timezone": No such file or directory > LOG: could not open directory "/share/timezone": No such file or directory > LOG: could not open directory "/share/timezone": No such file or directory > LOG: could not open directory "/share/timezone": No such file or directory > WARNING: could not open directory "/share/timezonesets": No such file or > directory > HINT: This may indicate an incomplete PostgreSQL installation, or that the > file "/bin/postgres" has been moved away from its proper location. > FATAL: invalid value for parameter "timezone_abbreviations": "Default" > > The files and directories are in /usr/local/pgsql/share: > > postgres@salmo:$ ls /usr/local/pgsql/share/ > conversion_create.sql postgres.bki sql_features.txt > doc/ postgres.description system_views.sql > information_schema.sql postgres.shdescription timezone/ > man/ postgresql.conf.sample timezonesets/ > pg_hba.conf.sample psqlrc.sample tsearch_data/ > pg_ident.conf.sample recovery.conf.sample unknown.pltcl > pg_service.conf.sample snowball_create.sql > > What do I do to overcome this impasse and get postgres running again? > > Rich As I remember it there was more than one version of Postgres on this machine. Are you sure you are using the correct postgres binary? While I am it is there a reason you are not using the system start scripts or pg_ctl:)? -- Adrian Klaver adrian.klaver@gmail.com
On 12/20/10 5:09 PM, Rich Shepard wrote: > I built and installed -9.0.1 on my Slackware-13.1 server and it ran > for a > while. Now, without warning, one of my applications dependent upon > postgres > won't run. While trying to restart postgres I learned the .pid file > did not > exist so I removed /tmp/.s.PGSQL* and tried to restart postgres. > > Here's what I see: > > postgres@salmo:$ postgres -D /usr/local/pgsql/data & > [1] 16044 > postgres@salmo:/var/log/httpd$ LOG: could not open directory > "/share/timezone": No such file or directory > LOG: could not open directory "/share/timezone": No such file or > directory > LOG: could not open directory "/share/timezone": No such file or > directory > LOG: could not open directory "/share/timezone": No such file or > directory > LOG: could not open directory "/share/timezone": No such file or > directory > WARNING: could not open directory "/share/timezonesets": No such file or > directory > HINT: This may indicate an incomplete PostgreSQL installation, or > that the > file "/bin/postgres" has been moved away from its proper location. > FATAL: invalid value for parameter "timezone_abbreviations": "Default" > > The files and directories are in /usr/local/pgsql/share: if you built and installed postgres in /usr/local/pgsql, then all those errors should have referred to /usr/local/pgsql/share/timezone is there a different postgres binary in /bin/postgres ? execute... postgres@salmo:$ /usr/local/pgsql/bin/pg_config and reply to the list with the output... also, postgres@salmo:$ which postgres
On Mon, 20 Dec 2010, Adrian Klaver wrote: > As I remember it there was more than one version of Postgres on this > machine. Are you sure you are using the correct postgres binary? While I > am it is there a reason you are not using the system start scripts or > pg_ctl:)? Adrian, There _was_ a library not removed when I removed -8.3.3, but that's been gone a while. This had been running until yesterday when I could not log in to my accounting software that uses postgres as the back end. The reason I don't use /etc/rc.d/rc.postgresql is that it doesn't work. While it supposedly su's to user postgres, it actually does not do so. Ergo, nothing starts. Looking for running postgres processes I find none: [root@salmo ~]# ps ax | grep postgres 17168 pts/2 S+ 0:00 grep postgres And when I try to start the postmaster as user postgres it fails (as reported in my original message): postgres@salmo:/home/rshepard$ LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory LOG: could not open directory "/share/timezone": No such file or directory WARNING: could not open directory "/share/timezonesets": No such file or directory HINT: This may indicate an incomplete PostgreSQL installation, or that the file "/bin/postgres" has been moved away from its proper location. FATAL: invalid value for parameter "timezone_abbreviations": "Default" [1]+ Exit 1 postgres -D /usr/local/pgsql/data This has not happened before. Rich
On Mon, 20 Dec 2010, John R Pierce wrote: > if you built and installed postgres in /usr/local/pgsql, then all those > errors should have referred to /usr/local/pgsql/share/timezone John, I assumed the reference to share/ was relative to /usr/local/pgsql/ > is there a different postgres binary in /bin/postgres ? Aha! I had a copy of /usr/local/pgsql/bin/postgres in /bin rather than a soft link. I just fixed that and postgres starts. Still cannot log in to my accounting software, even after restarting httpd. That brings me back to my original problem: server error that won't allow me to log in. There's a problem with the perl DBD::Pg module that prevents it from loading. Sigh. I'll focus on that now. Thanks, Rich
On Monday 20 December 2010 7:12:52 pm Rich Shepard wrote: > On Mon, 20 Dec 2010, Adrian Klaver wrote: > > As I remember it there was more than one version of Postgres on this > > machine. Are you sure you are using the correct postgres binary? While I > > am it is there a reason you are not using the system start scripts or > > pg_ctl:)? > > Adrian, > > There _was_ a library not removed when I removed -8.3.3, but that's been > gone a while. This had been running until yesterday when I could not log in > to my accounting software that uses postgres as the back end. > > The reason I don't use /etc/rc.d/rc.postgresql is that it doesn't work. > While it supposedly su's to user postgres, it actually does not do so. > Ergo, nothing starts. Well that would be a problem. Still, using pg_ctl would be an improvement. From the docs (http://www.postgresql.org/docs/9.0/interactive/app-pg-ctl.html): "pg_ctl is a utility for initializing a PostgreSQL database cluster, starting, stopping, or restarting the PostgreSQL backend server (postgres), or displaying the status of a running server. Although the server can be started manually, pg_ctl encapsulates tasks such as redirecting log output and properly detaching from the terminal and process group. It also provides convenient options for controlled shutdown." > > Looking for running postgres processes I find none: > > [root@salmo ~]# ps ax | grep postgres > 17168 pts/2 S+ 0:00 grep postgres The issue is not so much another running postgres but more than one in your PATH and you picking up the wrong one. A locate or find would help here. Also per Johns post you should run: /usr/local/pgsql/bin/pg_config That may help untangle this. > > And when I try to start the postmaster as user postgres it fails (as > > Rich -- Adrian Klaver adrian.klaver@gmail.com
On Mon, 20 Dec 2010, Adrian Klaver wrote: > Well that would be a problem. Still, using pg_ctl would be an improvement. > From the docs > (http://www.postgresql.org/docs/9.0/interactive/app-pg-ctl.html): "pg_ctl > is a utility for initializing a PostgreSQL database cluster, starting, > stopping, or restarting the PostgreSQL backend server (postgres), or > displaying the status of a running server. Although the server can be > started manually, pg_ctl encapsulates tasks such as redirecting log output > and properly detaching from the terminal and process group. It also > provides convenient options for controlled shutdown." The script stops the running postgres. Since the only time I should need to re-start it is after a re-boot (a distribution upgrade with a new kernel), starting manually is not a big deal: postgres@salmo:/home/rshepard$ postgres -D /usr/local/pgsql/data & [1] 17318 postgres@salmo:/home/rshepard$ LOG: database system was shut down at 2010-12-20 19:04:58 PST LOG: database system is ready to accept connections LOG: autovacuum launcher started [rshepard@salmo ~]$ ps ax | grep postgres 17318 pts/1 S 0:00 postgres -D /usr/local/pgsql/data 17320 ? Ss 0:00 postgres: writer process 17321 ? Ss 0:00 postgres: wal writer process 17322 ? Ss 0:00 postgres: autovacuum launcher process 17323 ? Ss 0:00 postgres: stats collector process 17405 pts/1 S+ 0:00 grep postgres All processes running. Thanks, Adrian, Rich