From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Wilton Wonrath <wrwonrath(at)yahoo(dot)com(dot)br> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Continue sequence |
Date: | 2007-01-05 20:13:00 |
Message-ID: | 20070105201300.GA20611@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jan 05, 2007 at 09:30:46 -0800,
Wilton Wonrath <wrwonrath(at)yahoo(dot)com(dot)br> wrote:
>
> I think that I will need to use LOCK TABLE or SELECT FOR UPDATE, but in
> both cases if the client terminal shutdown suddenly the tuple/table
> stays locked on the server for a indeterminate time.
You need to use LOCK TABLE to block other sessions from concurrently inserting
the same item.
What is the purpose of the number column that requires there to be no gaps
for a particular serie? If they could just be unique, you could use a single
sequence for the table and you wouldn't have to do locking.
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas F. O'Connell | 2007-01-05 20:17:02 | Re: Interrupted pg_dump / pg_restore Upgrade |
Previous Message | John McCawley | 2007-01-05 20:09:31 | Re: Database versus filesystem for storing images |