Re: Moving from MySQL to PGSQL....some questions (multilevel

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
Cc: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Moving from MySQL to PGSQL....some questions (multilevel
Date: 2004-03-04 15:27:26
Message-ID: 20040304152726.GA13990@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 04, 2004 at 08:48:40 -0600,
"Karl O. Pinc" <kop(at)meme(dot)com> wrote:
>
> So it sounds like this would be a concurrency safe way to perform
> the operation. It also sounds like it might be a good idea
> to do SELECT FOR UPDATE on the table/row keyed by id1 to keep
> the serialized transactions from stepping on each other's toes.

This won't always work since SELECT FOR UPDATE only locks tuples
visible to the current transaction. It won't keep another transaction
from inserting new tuples that would meet the critera. I think the
current general solution is to lock the table.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josué Maldonado 2004-03-04 15:43:36 Enable/Disable triggers
Previous Message Tom Lane 2004-03-04 15:13:33 Re: REFERENCES error message complaint, suggestion