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/