Re: Locking tables

From: Allan Berger <alb2(at)cornell(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Locking tables
Date: 2003-07-21 17:58:32
Message-ID: a05200f0ebb41d755849f@[128.255.89.219]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

At 12:49 PM -0500 7/21/03, Bruno Wolff III wrote:
>If you just need uniqueness (e.g. there can be gaps in the ids), you
>can use sequences to do this more efficiently.

Thanks for the [three] speedy replies!

I know my example was simple--I just wanted to illustrate.

I want to put as much of the code as possible in the database front
end for control and maintenance purposes. I have explicitly
considered the performance degradation and am willing to accept it.

Although having written this, maybe I should just lock everything in
"access exclusive mode" for the brief periods of time these
transactions will be pending, and not worry about identifying the
_least_ restrictive that will block intercurrent Selects (until I
actually do create a performance problem).

[After writing the paragraph immediately above I received Stephan
Szabo's response, which perhaps endorses draconian locks given my
perception of my need.]
AB

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Chad Thompson 2003-07-21 18:03:32 Re: Select Statement Hang...
Previous Message Stephan Szabo 2003-07-21 17:52:39 Re: Locking tables