Re: queston about locking

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ottavio Campana <ottavio(at)campana(dot)vi(dot)it>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, pgsql-general(at)postgresql(dot)org
Subject: Re: queston about locking
Date: 2007-09-21 10:16:46
Message-ID: 20070921101646.GA17833@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 21, 2007 at 11:53:54AM +0200, Ottavio Campana wrote:
> the point is that for each table I have a copy I previously made and I
> want to create an incremental backup. My problem is that I don't want
> the original table to change, so I lock it.
>
> I admin that exclusive lock is probably too much.

Why not just use SERLIALISED transaction mode, then your program won't
see any changes, while other programs can still use it normally. That's
how pg_dump generates consistant backups.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2007-09-21 10:18:24 Re: "not in" clause too slow?
Previous Message Ottavio Campana 2007-09-21 10:09:50 "not in" clause too slow?