Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Rich Shepard
On Sun, 27 Jul 2008, Andrej Ricnik-Bay wrote: I thought we had established that this issue was caused by the current instance pointing at the old installs data directory? No, that wasn't the problem. If I use 'postgres -D /var/lib/pgsql/data ' the postmaster starts correctly and

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Andrej Ricnik-Bay
2008/7/28 Rich Shepard [EMAIL PROTECTED]: Thank you. I think that for some reason using pg_ctl to start the postmaster is no longer working here. As I have time, I'll look into why. Can you do a 'locate pg_ctl|xargs ls -l' and see whether you have more than one installed, and if so, which one

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Rich Shepard
On Mon, 28 Jul 2008, Andrej Ricnik-Bay wrote: Can you do a 'locate pg_ctl|xargs ls -l' and see whether you have more than one installed, and if so, which one comes first in the PATH? Andrej, There are two: -rwxr-xr-x 1 root root 24320 2008-06-17 16:18 /usr/bin/pg_ctl -rw-r--r-- 1 root

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Rich Shepard
On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote: Now there's an interesting piece of information :) How long ago did you upgrade it? Andrej, I found the thread in the archives for June of this year. Re-reading the posted results of running initdb I tried a different approach to starting

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Andrej Ricnik-Bay
On 27/07/2008, Rich Shepard [EMAIL PROTECTED] wrote: Andrej, Hi Rich, I found the thread in the archives for June of this year. Re-reading the posted results of running initdb I tried a different approach to starting the server. Instead of using pg_ctl I used 'postgres -D

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes: My question is how best to modify the startup script so the postmaster fires up when the system is rebooted. I don't see an option to 'su' to specify the postgres user's password so I can script this. Startup scripts invariably run as root, so 'su'

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Andrej Ricnik-Bay
On 27/07/2008, Tom Lane [EMAIL PROTECTED] wrote: Startup scripts invariably run as root, so 'su' isn't going to ask for a password... And it's nothing to worry about because the script he's using is suing to the postgres user anyway ... regards, tom lane Cheerw,

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Rich Shepard
On Sun, 27 Jul 2008, Andrej Ricnik-Bay wrote: if [ -x /etc/rc.d/rc.postgres ]; then /etc/rc.d/rc.postgres start fi to your /etc/rc.d/rc.local Well, that's the problem, Andrej. I have that script, and it worked fine with postgres-6.x through -8.1, but failed to correctly start the

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Rich Shepard
On Sat, 26 Jul 2008, Tom Lane wrote: Startup scripts invariably run as root, so 'su' isn't going to ask for a password... Tom, That occurred to me after I wrote the message. Think that I'll tune the script to use a command that I know is working with 8.3.3. Many thanks, Rich -- Richard

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Andrej Ricnik-Bay
On 27/07/2008, Rich Shepard [EMAIL PROTECTED] wrote: Well, that's the problem, Andrej. I have that script, and it worked fine with postgres-6.x through -8.1, but failed to correctly start the postmaster after the system reboot. I thought we had established that this issue was caused by the

[GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard
My server is rebooted infrequently, usually after a kernel upgrade and on very rare occasions when something causes it to hang. After rebooting I always have serious issues getting postgresql running again, even though the startup script is part of the boot sequence. Yesterday was one of those

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes: My server is rebooted infrequently, usually after a kernel upgrade and on very rare occasions when something causes it to hang. After rebooting I always have serious issues getting postgresql running again, even though the startup script is part of the

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard
On Tue, 22 Jul 2008, Tom Lane wrote: The short answer is probably don't use Slackware's startup script. Some distros have PG start scripts that have had the bugs beaten out of them, and others not so much. Excellent advice, Tom. I'll take it. Have you read the script to see what condition

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes: I tried following the logic, and it appears the issue now is 'invalid data in PID file /var/lib/pgsql/data/postmaster.pid '. If I delete that file, is it automatically recreated? I'm using /usr/bin/pg_ctl as user postgres. If you're certain there's no

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard
On Tue, 22 Jul 2008, Tom Lane wrote: If you're certain there's no postmaster running, it's safe to remove postmaster.pid. However you really shouldn't have to; the postmaster is generally able to figure out whether a pidfile is live or not. Tom, I thought the postmaster knew what was

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Jeff Soules
I tried following the logic, and it appears the issue now is 'invalid data in PID file /var/lib/pgsql/data/postmaster.pid '. If I delete that file, is it automatically recreated? Why not just move it and rename it? If it's recreated, great; if not, you still have the corrupted file on hand

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Andrej Ricnik-Bay
On 23/07/2008, Rich Shepard [EMAIL PROTECTED] wrote: When I run the Slackware script, '/etc/rc.d/rc.postgresql start' (script attached), I'm shown a process ID and told the daemon is already running. For example: Since there are no official Slackware postgres packages I'd like to ask where

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes: On Tue, 22 Jul 2008, Tom Lane wrote: The invalid data bit is interesting though. It looks like pg_ctl would produce that error if the pidfile exists but is empty when it looks. This seems like a race condition hazard, though the odds of hitting it are

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard
On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote: Since there are no official Slackware postgres packages I'd like to ask where that script came from :) and how you installed postges in the first place. Happy to communicate of the list if you prefer that. Andrej, Unless others consider this

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Andrej Ricnik-Bay
On 23/07/2008, Rich Shepard [EMAIL PROTECTED] wrote: Andrej, Hi Rich, Unless others consider this topic to be not appropriate for the list, I don't mind a public conversation. I thought that I attached the script to my original message; regardless, here's the attribution: You did - my

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard
On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote: Now there's an interesting piece of information :) How long ago did you upgrade it? Andrej, A month ago; June 17th to be exact. From which version of pg to which version did you upgrade, From 8.1.13 to 8.3.3. and how did you go about

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Joshua D. Drake
On Tue, 2008-07-22 at 18:05 -0700, Rich Shepard wrote: On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote: Now there's an interesting piece of information :) How long ago did you upgrade it? ... something broke during the reboot. From /var/log/postgresql: FATAL: database files are