Re: Locking entire database

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: depesz(at)depesz(dot)com
Cc: "Panagiotis Pediaditis" <pped(at)ics(dot)forth(dot)gr>, pgsql-general(at)postgresql(dot)org
Subject: Re: Locking entire database
Date: 2007-09-15 23:20:13
Message-ID: b42b73150709151620j736ff24fx89604e99a23e5ad2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/15/07, hubert depesz lubaczewski <depesz(at)depesz(dot)com> wrote:
> On Fri, Sep 14, 2007 at 04:48:08PM +0300, Panagiotis Pediaditis wrote:
> > Is there some way of locking all database tables in a transaction
> > without knowing their names
> > or even better just locking the entire database? I know this is bad
> > tactics but there is a specific
> > case where i need it. Can it be done?
>
> there is no such thing, but you can use "advisory locks" to this
> purpose.

that would require taking a shared advisory lock for every
transaction...pretty big price to pay imo, but it would work. I
thought about it for a bit and I don't know if there is any other way
to do it.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul Lambert 2007-09-15 23:23:50 Function to determine next payment date
Previous Message Sean Davis 2007-09-15 22:31:00 Re: GRANT on group does not give access to group members