From: | Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com> |
---|---|
To: | Jerry Lynde <jlynde(at)diligence(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postmaster won't -HUP |
Date: | 2000-06-01 00:01:38 |
Message-ID: | 3935A7E2.1DB5586E@cupid.suninternet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jerry Lynde wrote:
>
> Hello out there,
>
> I'm having a problem with a production server. Actually, there are two
> problems. The semi-trivial problem is that Postgres won't die using the
> service mechanism. As root, I "service postgres stop" and then "service
> postgres start" after a reasonable wait. The restart will earn me a
> "StreamServerPort: cannot bind to port" which indicates tht the process
> never died. A ps ax confirms the persistance of postmaster. When I kill -9
> the processes (postmaster, the /bin/sh -c postgres, and logger) they
> process will claim to start with "service postgres start" but it reports no
> PID and doesn't show up in ps ax. It is clearly not running at this point.
Hmm, on debian it always dies, though it does takes a while sometimes.
Also, try to avoid kill -9 because then it can't clean up shared memory,
locks, temporary files, etc. Try kill -INT or -TERM.
> The real problem, which caused all this debugging, is that twice so far,
> for no apparent reason, I have pegged the processors on the server. The
> machine has two 500mHz processors with 256 MB ram. I have a hard time
> believing that one small query can bring that machine to its knees, but it
> has, twice. The queries were run through a hard coded php front end (for
> testing purposes). Any insight on these two problems would be appreciated
> greatly.
Heh. Yes, I also wonder why "select * from bigtable" where bigtable is
a 400,000 row table crashes the machine also :). (This is pg_dump btw).
Maybe you should post the query.
Actually, there is one other situation I've killed the machine nearly.
I have two big tables, "bigtable" and "largetable". Then do this
query:
select * from bigtable where largetable.a = 1;
(ofcourse the actual query was much longer but this one demonstrates the
problem). It actually does a join between those two tables even though
only one is mentioned in the from part. Running explain over this told
that this would take a *very* long time to complete.
This is probably not a problem in newer versions though. What version
are you using?
--
Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>
http://cupid.suninternet.com/~kleptog/
From | Date | Subject | |
---|---|---|---|
Next Message | Jackson Ching | 2000-06-01 00:54:53 | Locking Level |
Previous Message | Ed Loehr | 2000-05-31 23:34:53 | Re: Postmaster won't -HUP |