Re: Killing a session in windows

From: Howard Cole <howardnews(at)selestial(dot)com>
To: 'PgSql General' <pgsql-general(at)postgresql(dot)org>
Subject: Re: Killing a session in windows
Date: 2007-12-11 22:20:36
Message-ID: 475F0D34.8030005@selestial.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello everyone,

I take it from the lack of response that nobody knows how to kill a
connection from the postgresql side on windows? Is there another way
around this? In the end I created another database and changed all my
code to use the new database, the original database is still there (now
redundant for 4 days) and the mysterious connection is still there.
There has to be a better solution?

Howard.

Howard Cole wrote:
> Hi,
>
> I've written about this problem before and thanks to Bill Bartlett and
> Richard Huxton for previous replies, but the problem keeps coming up...
>
> I'm running postgresql V8.2.5 (I think!) on W2K3 Server and
> occasionally I want to rebuild a database. However I cannot drop the
> database because there is some unclosed client attached.
>
> Following Richard and Bills suggestions, I have tried
> pg_cancel_backend(pid) but the process remains in pg_stat_activity and
> the process still runs.
>
> I then kill the process directly using taskill but again, the process
> remains in pg_stat_activity and I cannot drop the database.
>
> I eventually have to resort to restarting the postgres service, but
> this is on a live system running several database so I do not want to
> have to do this.
>
> Any suggestions?
>
> Ta
>
> Howard
> www.selestial.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2007-12-11 22:22:06 Re: Hijack!
Previous Message Richard Broersma Jr 2007-12-11 22:10:16 Re: if exists...does it exists for insert statments?