Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Tom Lane
Rich Shepard writes: >Since I cannot start the postmaster I cannot run pg_dumpall. As far as I can tell you *are* starting the postmaster, and it is responding when you query it via TCP (eg, with "psql -h localhost"). What is not working is connections via the Unix socket. I still suspect th

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Scott Marlowe
On Thu, Oct 21, 2010 at 12:38 PM, Rich Shepard wrote: > On Thu, 21 Oct 2010, Reid Thompson wrote: > >> what does >> $ netstat -an |grep 5432 >> return? >> >> something is running on tcp port 5432 > >  Doesn't show that. > > [rshep...@salmo ~]$ netstat -an |grep 5432 > tcp        0      0 127.0.0.1

Re: [GENERAL] Cannot Start Postgres After System Boot [SOLVED]

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Adrian Klaver wrote: The missing piece of information seems to be the system board failure. My guess is that caused corruption. See if you can connect by doing: psql -h localhost -d aesi Adrian, [rshep...@salmo ~]$ psql -h localhost -d aesi psql: could not connect to se

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Andrej
On 22 October 2010 07:45, Rich Shepard wrote: >  When I run 'ps ax | grep post' I found a few postgres processes. I tried > '/etc/rc.d/rc.postgresql stop' but that had no effect. I killed the lowest > numbered process and that removed them all. However, I still cannot start a > new postgresql proc

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Reid Thompson
On Thu, 2010-10-21 at 11:45 -0700, Rich Shepard wrote: > On Thu, 21 Oct 2010, Scott Marlowe wrote: > > > So a postgres IS running on your machine. I put it to you it's not > > running where you think it is. > >When I run 'ps ax | grep post' I found a few postgres processes. I tried > '/etc/r

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Reid Thompson
On Thu, 2010-10-21 at 11:38 -0700, Rich Shepard wrote: > On Thu, 21 Oct 2010, Reid Thompson wrote: > > > what does > > $ netstat -an |grep 5432 > > return? > > > > something is running on tcp port 5432 > >Doesn't show that. > > [rshep...@salmo ~]$ netstat -an |grep 5432 > tcp0 0

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Scott Marlowe wrote: So a postgres IS running on your machine. I put it to you it's not running where you think it is. When I run 'ps ax | grep post' I found a few postgres processes. I tried '/etc/rc.d/rc.postgresql stop' but that had no effect. I killed the lowest num

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Reid Thompson wrote: what does $ netstat -an |grep 5432 return? something is running on tcp port 5432 Doesn't show that. [rshep...@salmo ~]$ netstat -an |grep 5432 tcp0 0 127.0.0.1:5432 0.0.0.0:* LISTEN Rich -- Sent via pgsql-gener

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Scott Marlowe wrote: WHOA, never delete those files unless you're sure you've killed off postgres first. Then and only then you can delete them and safely restart. If you ever manage to bring up two postmasters on the same store you've just destroyed your database. Scott

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Tom Lane wrote: Actually, I was saying that the script should *not* concern itself with the pidfile at all. Tom, I understood what you wrote. Hmm, maybe the postmaster thinks it should be putting the socket file someplace other than /tmp. Have you got a nondefault set

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Adrian Klaver
On 10/21/2010 11:21 AM, Rich Shepard wrote: On Thu, 21 Oct 2010, Scott Marlowe wrote: WHOA, never delete those files unless you're sure you've killed off postgres first. Then and only then you can delete them and safely restart. If you ever manage to bring up two postmasters on the same store y

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Scott Marlowe
On Thu, Oct 21, 2010 at 11:35 AM, Rich Shepard wrote: > On Thu, 21 Oct 2010, Scott Marlowe wrote: > >> So, what do >> >> telnet localhost 5432 > > Scott, > >  That port's clear: > > [rshep...@salmo ~]$ telnet localhost 5432 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Reid Thompson
On Thu, 2010-10-21 at 10:35 -0700, Rich Shepard wrote: > On Thu, 21 Oct 2010, Scott Marlowe wrote: > > > So, what do > > > > telnet localhost 5432 > > Scott, > >That port's clear: > > [rshep...@salmo ~]$ telnet localhost 5432 > Trying 127.0.0.1... > Connected to localhost. > Escape characte

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Scott Marlowe
On Thu, Oct 21, 2010 at 11:36 AM, Lennin Caro wrote: > > Try to delete the files like this > > .s.PGSQL.5432 > .s.PGSQL.5432.lock > 8.x-main.pid > > and restart postmaster WHOA, never delete those files unless you're sure you've killed off postgres first. Then and only then you can delete them a

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Tom Lane
Rich Shepard writes: > On Wed, 20 Oct 2010, Tom Lane wrote: >> In particular, I wonder whether the script's refusal to start if the >> pidfile already exists accounts for your report that it fails to >> auto-restart after a reboot. >This clears up my uncertainty. The pidfile should not exist

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Adrian Klaver wrote: What does your postgresql.conf file show for ? : listen_addresses = Adrian, #listen_addresses = 'localhost' # what IP address(es) to listen on; This hasn't changed. Thanks, Rich -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Adrian Klaver
On 10/21/2010 10:41 AM, Rich Shepard wrote: On Thu, 21 Oct 2010, Reid Thompson wrote: what does $ netstat -an|grep 5432 return? Reid, [rshep...@salmo ~]$ netstat -an|grep 5432 tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN unix 3 [ ] STREAM CONNECTED 785432 what does $ ps -ef|grep post return? Th

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Lennin Caro wrote: Try to delete the files like this .s.PGSQL.5432 .s.PGSQL.5432.lock 8.x-main.pid and restart postmaster Lennin, The sockets are not to be found. Rich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Reid Thompson wrote: what does $ netstat -an|grep 5432 return? Reid, [rshep...@salmo ~]$ netstat -an|grep 5432 tcp0 0 127.0.0.1:5432 0.0.0.0:* LISTEN unix 3 [ ] STREAM CONNECTED 785432 what does $ ps -ef|grep p

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Lennin Caro
--- On Thu, 10/21/10, Reid Thompson wrote: From: Reid Thompson Subject: Re: [GENERAL] Cannot Start Postgres After System Boot To: "Rich Shepard" Cc: pgsql-general@postgresql.org Date: Thursday, October 21, 2010, 4:28 AM On 10/20/2010 6:53 PM, Rich Shepard wrote: >   For rea

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Thu, 21 Oct 2010, Scott Marlowe wrote: So, what do telnet localhost 5432 Scott, That port's clear: [rshep...@salmo ~]$ telnet localhost 5432 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. AND psql -h localhost -l Huh! [rshep...@salmo ~]$ psql -h localhost

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Scott Marlowe
On Thu, Oct 21, 2010 at 11:27 AM, Rich Shepard wrote: >  Yet, when I try to access one of my databases I cannot: > > [rshep...@salmo ~]$ psql aesi > psql: could not connect to server: No such file or directory >        Is the server running locally and accepting >        connections on Unix domain

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-21 Thread Rich Shepard
On Wed, 20 Oct 2010, Tom Lane wrote: Personally, I'd drop all the machinations with checking the pidfile or removing old socket files. Tom, I didn't write the script; whoever maintains the Slackware package for PostgreSQL did. Regardless, I'll make the changes you suggest. In particular,

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-20 Thread Scott Marlowe
On Wed, Oct 20, 2010 at 4:53 PM, Rich Shepard wrote: >  For reasons I do not understand, the Slackware start-up file for postgres > (/etc/rc.d/rc.postgresql) fails to work properly after I reboot the system. > (Reboots normally occur only after a kernel upgrade or with a hardware > failure that cr

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-20 Thread Reid Thompson
On 10/20/2010 6:53 PM, Rich Shepard wrote: For reasons I do not understand, the Slackware start-up file for postgres (/etc/rc.d/rc.postgresql) fails to work properly after I reboot the system. (Reboots normally occur only after a kernel upgrade or with a hardware failure that crashes the system

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-20 Thread Andrej
On 21 October 2010 16:50, Tom Lane wrote: > could be reduced to just: > >                else >                        su postgres -c 'postgres -D /var/lib/pgsql/data &' >                        exit 0 >                fi > I'm not sure about your comment that manual start attempts fail with >  

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-20 Thread Tom Lane
Rich Shepard writes: >The entire script is attached. It's only 2588 bytes. Personally, I'd drop all the machinations with checking the pidfile or removing old socket files. The postmaster is fully capable of doing those things for itself, and is much less likely to do them mistakenly than th

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-20 Thread Rich Shepard
On Thu, 21 Oct 2010, Andrej wrote: Please do - provide the section, I mean. Andrej, The entire script is attached. It's only 2588 bytes. Also, when there is no postmaster.pid or .s.PGSQL.5432 (and its lock file) are these recreated automagically when postgres is properly loaded, or do I

Re: [GENERAL] Cannot Start Postgres After System Boot

2010-10-20 Thread Andrej
On 21 October 2010 11:53, Rich Shepard wrote: >  If someone would be kind enough to point out what I'm doing incorrectly > (e.g., removing /tmp/.s.PGSQL.5432 and postmaster.pid when the startup > process complains they're not right) I'll save this information for the next > time. I can also provid

[GENERAL] Cannot Start Postgres After System Boot

2010-10-20 Thread Rich Shepard
For reasons I do not understand, the Slackware start-up file for postgres (/etc/rc.d/rc.postgresql) fails to work properly after I reboot the system. (Reboots normally occur only after a kernel upgrade or with a hardware failure that crashes the system.) Trying to restart the system manually