From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sally Sally <dedeb17@hotmail.com>
Cc: ajs@crankycanuck.ca
Cc: pgsql-admin@postgresql.org
Subject: Re: Unable to connect to a specific database
Date: Mon, 16 Jan 2006 13:23:47 -0500
Message-ID: <10098.1137435827@sss.pgh.pa.us> (raw)
In-Reply-To: <BAY101-F325C612D990D4CAB81AE98AB1B0@phx.gbl>
References: <BAY101-F325C612D990D4CAB81AE98AB1B0@phx.gbl>
"Sally Sally" <dedeb17@hotmail.com> writes:
> Well after kill -9, it was in recovery mode but I restarted the server
> again. It took a while (~ 45min) but it connected again. I have noticed that
> after a vacuum it takes a while to connect for the first time. You mentioned
> kill -9 is very bad news. Everything seems to be working fine now, should I
> be worried? What are the consequences?
The problem with kill -9 is mainly if you use it to kill the postmaster;
then the postmaster is unable to release its shared memory segment
before quitting. Depending on how your kernel handles shared memory,
the segment might stick around indefinitely (unless manually cleaned up
or you reboot the whole machine). This will eventually run the system
out of memory and/or prevent launching a new postmaster.
kill -9 on an individual backend isn't so dangerous, but it's still
using a steam hammer to swat a fly. Try less invasive methods first,
like kill -INT (ie, query cancel).
BTW, the unreasonably long restart time suggests that you've set
unreasonably long inter-checkpoint intervals. Might want to think
about backing off the checkpoint parameters a bit.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, dedeb17@hotmail.com, ajs@crankycanuck.ca
Subject: Re: Unable to connect to a specific database
In-Reply-To: <10098.1137435827@sss.pgh.pa.us>
References: <BAY101-F325C612D990D4CAB81AE98AB1B0@phx.gbl> <10098.1137435827@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox