Re: lock entire database - Mailing list pgsql-novice

From Gaetano Mendola
Subject Re: lock entire database
Date
Msg-id 4113C6BD.8070205@bigfoot.com
Whole thread Raw
In response to Re: lock entire database  (Steve Tucknott <steve@retsol.co.uk>)
List pgsql-novice
Steve Tucknott wrote:

> We have a similar request.
> We have a 'program' that does database 'structure' updates and do not
> want the users touching the database while this is going on. In Informix
> this was achieved by placing and EXCLUSIVE lock on the database itself.
> Is there a (simple) way of 'locking out' specific users under PostGre to
> achieve the same end?

Database structures change can be inserted inside a transaction, so you don't
need to lock the entire DB:

begin;
<change your schema>;
commit;



Regards
Gaetano Mendola





pgsql-novice by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: Tables in one disk and indexes in another ??
Next
From: "Scott Marlowe"
Date:
Subject: Re: Tables in one disk and indexes in another ??