[GENERAL] Locking Down a Database

2010-07-15 Thread Terry Lee Tucker
Greetings:

I occasionally find the need to perform some maintenance on one or more of 
thirteen different databases. Typically, due to the interaction between the 
databases, I need to lock down the databases for a short period of time so 
that no updates are being performed anywhere. I do not want to shut down the 
postmasters as it is a clustered environment and would rather just leave that 
alone. Also, since this is a 24 hour shop, it would be good if people could 
still query, but not change any data. All this work is done at times like 
03:00 in the morning and the number of people working at that time is limited 
to five or six. Is there some easy way of doing this without having people log 
out of the application?

TIA...
-- 
Terry Lee Tucker
tel: (336) 372-5432; cell: (336) 404-6897
te...@chosen-ones.org

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Locking Down a Database

2010-07-15 Thread Shoaib Mir
On Thu, Jul 15, 2010 at 10:53 PM, Terry Lee Tucker te...@chosen-ones.orgwrote:

 Greetings:

 I occasionally find the need to perform some maintenance on one or more of
 thirteen different databases. Typically, due to the interaction between the
 databases, I need to lock down the databases for a short period of time so
 that no updates are being performed anywhere.


There is something that I saw the other day in PG 9.0 i.e.
transaction_read_only which might be helpful in your case.
-- 
Shoaib Mir
http://shoaibmir.wordpress.com/


Re: [GENERAL] Locking Down a Database

2010-07-15 Thread Guillaume Lelarge
Le 15/07/2010 16:21, Shoaib Mir a écrit :
 On Thu, Jul 15, 2010 at 10:53 PM, Terry Lee Tucker
 te...@chosen-ones.org mailto:te...@chosen-ones.org wrote:
 
 Greetings:
 
 I occasionally find the need to perform some maintenance on one or
 more of
 thirteen different databases. Typically, due to the interaction
 between the
 databases, I need to lock down the databases for a short period of
 time so
 that no updates are being performed anywhere. 
 
 
 There is something that I saw the other day in PG 9.0 i.e.
 transaction_read_only which might be helpful in your case. 

transaction_read_only is not something you can set. It's set by the
server, to on on a hotstandby server, and else to off. And
default_transaction_read_only can be unset, so not that useful too.

-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general