pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Biagioni <andrew.biagioni@e-greek.net>
To: shan@ceedees.com
To: mallah@trade-india.com
Cc: pgsql-admin@postgresql.org
Subject: Re: How to stop a particular database - reg.
Date: Wed, 19 Mar 2003 09:54:44 -0500
Message-ID: <B9A63D9HFZUC7PJ07ECROIJHC7KJWS.3e7884b4@Laptop> (raw)
In-Reply-To: <1103.219.65.236.140.1048082502.squirrel@mail.trade-india.com>

If you are trying to make more connections available without interrupting the 
current users, you can just use "kill" to kill the connections that are 
identified as connecting to your test database.  Then, when you have a chance 
to restart things without upsetting users, you can update max_connections etc.

I'm using linux, and I execute the following to find connections I want to 
terminate (kill):

	ps auxwww | grep "^postgres" | grep -v grep

It's a brute-force method, admittedly, but it works for me.  It's my 
understanding - and experience - that PostgreSQL recovers quite well from such 
things.

		Andrew


3/19/03 9:01:42 AM, <mallah@trade-india.com> wrote:

>
>I am marking a Cc to the list.
>lemme know if its invading your privacy.
>
>
>Is there any particular reason why you cannot increase
>max_connections to the extent your requirements are?
>
>may i know what is the current value  of max_connections
>in postgresql.conf ?
>
>PS: please use reply-all button so that the discussion is archived.
>
>Regds
>Mallah.
>
>
>
>
>> Dear Mallah,
>> 	     Thank you for you reply.  What I would like to do is to stop or
>> start a particular database.  The problem is this, we have been trying to 
use a connection
>> pooling example that was given in the jdbc list.  What happened was there 
were more connections
>> that what we had set as the max_connections.  This actually prevented users 
of the other
>> database from using postgres as the max_connections set in the postgres conf 
has long been
>> exceed by this error in the connection pooling
>> program.  So now what I want to do is to just stop the DB on which we were 
testing the
>> connection pooling without disturbing the others.  Hope this clarrifies your 
doubts.  Please do
>> let me know if there is any thing else that you would like to know.
>>
>> Thanks,
>>
>> Shan.
>>
>> On Wed, 2003-03-19 at 18:29, Rajesh Kumar Mallah wrote:
>>>
>>> Hi,
>>>
>>> If you are trying to make one database inaccesable you may revoke the 
permissions from it
>>> temporarily. i hope its allowed in postgresql.
>>>
>>> If you have changed a config parameter and want it to take effect , you may 
try pg_ctl reload.
>>>
>>>
>>> Can you please tell us the original problem
>>> you are trying to solve?
>>>
>>>
>>> regds
>>> mallah.
>>>
>>> On Wednesday 19 Mar 2003 12:38 pm, Shanmugasundaram Doraisamy wrote:
>>> > Dear Group!
>>> > 	    I have a DB server running Postgres 7.2.3.  On this server I have
>>> > multiple databases running.  I would like to stop & start a particular 
DB.  How do I do
>>> > this.
>>> >
>>> > for example.  I have databases named test, test1, test2, etc.  Now I 
would like to stop only
>>> > test2 without affecting the other DB's.  Please advice.
>>> >
>>> > Thanking you,
>>> >
>>> > Yours sincerely,
>>> >
>>> > Shan.
>>> >
>>> >
>>> >
>>> >
>>> > ---------------------------(end of broadcast)--------------------------- 
TIP 6: Have you
>>> > searched our list archives?
>>> >
>>> > http://archives.postgresql.org
>>> >
>>> >
>>>
>>> --
>>> Rajesh Kumar Mallah,
>>> Project Manager (Development)
>>> Infocom Network Limited, New Delhi
>>> phone: +91(11)6152172 (221) (L) ,9811255597 (M)
>>>
>>> Visit http://www.trade-india.com ,
>>> India's Leading B2B eMarketplace.
>
>
>
>-----------------------------------------
>Get your free web based email at trade-india.com.
>   "India's Leading B2B eMarketplace.!"
>http://www.trade-india.com/
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>
>






view thread (6+ messages)  latest in thread

Message-ID: <B9A63D9HFZUC7PJ07ECROIJHC7KJWS.3e7884b4@Laptop>
Permalink:  ../B9A63D9HFZUC7PJ07ECROIJHC7KJWS.3e7884b4@Laptop/
Also on:    postgresql.org/message-id/B9A63D9HFZUC7PJ07ECROIJHC7KJWS.3e7884b4@Laptop

 · 

reply

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: andrew.biagioni@e-greek.net, shan@ceedees.com, mallah@trade-india.com
  Subject: Re: How to stop a particular database - reg.
  In-Reply-To: <B9A63D9HFZUC7PJ07ECROIJHC7KJWS.3e7884b4@Laptop>
  References: <1103.219.65.236.140.1048082502.squirrel@mail.trade-india.com> <B9A63D9HFZUC7PJ07ECROIJHC7KJWS.3e7884b4@Laptop>

* 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