Re: Patch to allow multiple table locks in "Unison" - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Patch to allow multiple table locks in "Unison"
Date
Msg-id 200107252241.f6PMfBv19546@candle.pha.pa.us
Whole thread Raw
In response to Re: Patch to allow multiple table locks in "Unison"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
> In short, the order has to be user-specified, which pretty much
> means it had better be as given in the statement.  Which raises
> the significant question of why bother with such a patch at all, as
> opposed to using a series of LOCK statements as one can do already.
> (With more flexibility, since separate LOCK statements can specify
> different lock modes.)  What's the rationale for adding such a
> feature in the first place?  I don't see that it's buying anything.

The advantage is that you don't hold lock A while waiting for lock B.
It gets all the locks at the same time.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch to allow multiple table locks in "Unison"
Next
From: Neil Padgett
Date:
Subject: Re: Patch to allow multiple table locks in "Unison"