Re: Unable to connect to a specific database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sally Sally" <dedeb17(at)hotmail(dot)com>
Cc: ajs(at)crankycanuck(dot)ca, pgsql-admin(at)postgresql(dot)org
Subject: Re: Unable to connect to a specific database
Date: 2006-01-16 18:23:47
Message-ID: 10098.1137435827@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Sally Sally" <dedeb17(at)hotmail(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Qingqing Zhou 2006-01-17 01:22:27 Re: diff table utility
Previous Message Sally Sally 2006-01-16 17:50:26 Re: Unable to connect to a specific database