From: | "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com> |
---|---|
To: | Bosco Rama <postgres(at)boscorama(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: v8.3.4 metadata changes while users active |
Date: | 2012-04-05 15:38:25 |
Message-ID: | 0AD01C53605506449BA127FB8B99E5E10C368C5F@FMSMSX105.amr.corp.intel.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hmmm.... This sounds like it might work.
There are, in fact, only 2 users (roles). Lets call them "selectuser" and "moduser"
So, as the DBA, I just...
alter role selectuser connection limit 0;
alter role moduser connection limit 0;
Then kick everyone off (I usually use "pg_ctl kill TERM <procpid>" to do this)
Make changes as the DBA
Then...
alter role selectuser connection limit -1;
alter role moduser connection limit -1;
Done !
Correct?
-----Original Message-----
From: Bosco Rama [mailto:postgres(at)boscorama(dot)com]
Sent: Thursday, April 05, 2012 11:27 AM
To: Gauthier, Dave
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] v8.3.4 metadata changes while users active
Hey,
Gauthier, Dave wrote:
> Hmmmm... I don't have root access :-(
Do you have the ability to alter the users/roles? If so, you
could set their connection limit to 0 and then kick them off.
Do your work and then set their connection limit back to the
value it was before. The default is -1 (unlimited).
Here's how to set the connection limit:
alter role moduser connection limit 0;
This is only really viable if the set of users is small. You
mentioned only 2 before. I'm not sure if it was exactly 2 users
or 2 "types" of users.
Just a thought.
Bosco.
From | Date | Subject | |
---|---|---|---|
Next Message | Bosco Rama | 2012-04-05 16:04:25 | Re: v8.3.4 metadata changes while users active |
Previous Message | Guillaume Lelarge | 2012-04-05 15:37:12 | Re: BD impossible à recharger |