pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Unable to connect to a specific database
6+ messages / 4 participants
[nested] [flat]

* Unable to connect to a specific database
@ 2006-01-13 22:20 Sally Sally <dedeb17@hotmail.com>
  2006-01-14 02:19 ` Re: Unable to connect to a specific database Christopher Browne <cbbrowne@acm.org>
  2006-01-16 17:36 ` Re: Unable to connect to a specific database Andrew Sullivan <ajs@crankycanuck.ca>
  0 siblings, 2 replies; 6+ messages in thread

From: Sally Sally @ 2006-01-13 22:20 UTC (permalink / raw)
  To: pgsql-admin

I had to kill a vacuum in the middle with -9. I shut down and restarted the 
postgres server several times after that but I am unable to connect to the 
db that I was initially running vacuum on
I'm doing "psql dbname" and it hangs for a while. I'm still waiting. Any 
ideas?
Thanks





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Unable to connect to a specific database
  2006-01-13 22:20 Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
@ 2006-01-14 02:19 ` Christopher Browne <cbbrowne@acm.org>
  2006-01-16 17:38   ` Re: Unable to connect to a specific database Andrew Sullivan <ajs@crankycanuck.ca>
  1 sibling, 1 reply; 6+ messages in thread

From: Christopher Browne @ 2006-01-14 02:19 UTC (permalink / raw)
  To: pgsql-admin

> I had to kill a vacuum in the middle with -9. I shut down and
> restarted the postgres server several times after that but I am unable
> to connect to the db that I was initially running vacuum on
> I'm doing "psql dbname" and it hangs for a while. I'm still
> waiting. Any ideas?

"Kill -9" is distinctly not recommended.

It is possible that you have corrupted the database by issuing "kill
-9."

You might want to look into what backups you have...
-- 
wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','gmail.com').
http://linuxdatabases.info/info/nonrdbms.html
"Very funny, Scotty. Now beam down my clothes."



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Unable to connect to a specific database
  2006-01-13 22:20 Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
  2006-01-14 02:19 ` Re: Unable to connect to a specific database Christopher Browne <cbbrowne@acm.org>
@ 2006-01-16 17:38   ` Andrew Sullivan <ajs@crankycanuck.ca>
  2006-01-16 17:50     ` Re: Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Andrew Sullivan @ 2006-01-16 17:38 UTC (permalink / raw)
  To: pgsql-admin

On Fri, Jan 13, 2006 at 09:19:30PM -0500, Christopher Browne wrote:
> It is possible that you have corrupted the database by issuing "kill
> -9."

If that's true, then WAL doesn't work.  kill -9 shouldn't be any more
harmful than a machine crash.  That is to say, it's very bad news,
but it shouldn't actually corrupt the database.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
I remember when computers were frustrating because they *did* exactly what 
you told them to.  That actually seems sort of quaint now.
		--J.D. Baldwin



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Unable to connect to a specific database
  2006-01-13 22:20 Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
  2006-01-14 02:19 ` Re: Unable to connect to a specific database Christopher Browne <cbbrowne@acm.org>
  2006-01-16 17:38   ` Re: Unable to connect to a specific database Andrew Sullivan <ajs@crankycanuck.ca>
@ 2006-01-16 17:50     ` Sally Sally <dedeb17@hotmail.com>
  2006-01-16 18:23       ` Re: Unable to connect to a specific database Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Sally Sally @ 2006-01-16 17:50 UTC (permalink / raw)
  To: ajs@crankycanuck.ca; pgsql-admin

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?
Thanks


>From: Andrew Sullivan <ajs@crankycanuck.ca>
>To: pgsql-admin@postgresql.org
>Subject: Re: [ADMIN] Unable to connect to a specific database
>Date: Mon, 16 Jan 2006 12:38:09 -0500
>
>On Fri, Jan 13, 2006 at 09:19:30PM -0500, Christopher Browne wrote:
> > It is possible that you have corrupted the database by issuing "kill
> > -9."
>
>If that's true, then WAL doesn't work.  kill -9 shouldn't be any more
>harmful than a machine crash.  That is to say, it's very bad news,
>but it shouldn't actually corrupt the database.
>
>A
>
>--
>Andrew Sullivan  | ajs@crankycanuck.ca
>I remember when computers were frustrating because they *did* exactly what
>you told them to.  That actually seems sort of quaint now.
>		--J.D. Baldwin
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Unable to connect to a specific database
  2006-01-13 22:20 Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
  2006-01-14 02:19 ` Re: Unable to connect to a specific database Christopher Browne <cbbrowne@acm.org>
  2006-01-16 17:38   ` Re: Unable to connect to a specific database Andrew Sullivan <ajs@crankycanuck.ca>
  2006-01-16 17:50     ` Re: Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
@ 2006-01-16 18:23       ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2006-01-16 18:23 UTC (permalink / raw)
  To: Sally Sally <dedeb17@hotmail.com>; +Cc: ajs@crankycanuck.ca; pgsql-admin

"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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Unable to connect to a specific database
  2006-01-13 22:20 Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
@ 2006-01-16 17:36 ` Andrew Sullivan <ajs@crankycanuck.ca>
  1 sibling, 0 replies; 6+ messages in thread

From: Andrew Sullivan @ 2006-01-16 17:36 UTC (permalink / raw)
  To: pgsql-admin

On Fri, Jan 13, 2006 at 10:20:07PM +0000, Sally Sally wrote:
> I had to kill a vacuum in the middle with -9. I shut down and restarted the 
> postgres server several times after that but I am unable to connect to the 
> db that I was initially running vacuum on
> I'm doing "psql dbname" and it hangs for a while. I'm still waiting. Any 
> ideas?

What do your database logs say?  I expect that you're in recovery
mode, but it's impossible to tell from this note.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
The fact that technology doesn't work is no bar to success in the marketplace.
		--Philip Greenspun



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2006-01-16 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-13 22:20 Unable to connect to a specific database Sally Sally <dedeb17@hotmail.com>
2006-01-14 02:19 ` Christopher Browne <cbbrowne@acm.org>
2006-01-16 17:38   ` Andrew Sullivan <ajs@crankycanuck.ca>
2006-01-16 17:50     ` Sally Sally <dedeb17@hotmail.com>
2006-01-16 18:23       ` Tom Lane <tgl@sss.pgh.pa.us>
2006-01-16 17:36 ` Andrew Sullivan <ajs@crankycanuck.ca>

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