Re: lock entire database

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
Subject: Re: lock entire database
Date: 2004-08-06 17:58:21
Message-ID: 4113C6BD.8070205@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Gaetano Mendola 2004-08-06 18:14:10 Re: Tables in one disk and indexes in another ??
Previous Message Gastón Simone 2004-08-06 17:51:46 Tables in one disk and indexes in another ??