Re: Can we force fully disconnect all client connected to localhost:5432

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Gaurav K Srivastav <gauravgkp(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Can we force fully disconnect all client connected to localhost:5432
Date: 2009-12-30 17:42:57
Message-ID: 603c8f070912300942r406c708cn5a21a74337182067@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 30, 2009 at 7:36 AM, Gaurav K Srivastav <gauravgkp(at)gmail(dot)com> wrote:
> Sorry Craig,
>
> I am using
> PostgreSQL 8.3.8 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.6
> 20060404 (Red Hat 3.4.6-10)
> version. and in my case I have to drop database and recreate it without
> stop/restart database server.while several client are also running on this
> datbase server .As you told pg_terminate_backend() is for 8.4.
> Can you please let me know the how I can do this task via shell script.

I think you're missing Craig's point. On versions prior to 8.4, there
isn't a safe way to do this - you may crash your entire database
server. So while it's probably possible to write a shell script, you
may not like the results very much.

Also, this is starting to sound a bit more like a usage question,
which you might want to try on pgsql-general. This list is for bug
reports.

...Robert

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Williamson 2009-12-30 20:23:14 remove
Previous Message Gaurav K Srivastav 2009-12-30 12:36:12 Fwd: Can we force fully disconnect all client connected to localhost:5432