Re: changing multiple pk's in one update

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: changing multiple pk's in one update
Дата
Msg-id 396486430904131443w72ded091qe59c709c76dd0960@mail.gmail.com
обсуждение исходный текст
Ответ на Re: changing multiple pk's in one update  (Glenn Maynard <glennfmaynard@gmail.com>)
Ответы Re: changing multiple pk's in one update  (Glenn Maynard <glennfmaynard@gmail.com>)
Список pgsql-sql
On Mon, Apr 13, 2009 at 2:32 PM, Glenn Maynard <glennfmaynard@gmail.com> wrote:

> If your senses are reordered by someone else, and
> you operate on /10/3, you may suddenly find yourself viewing or
> modifying (or deleting!) a different sense.  This could even happen
> within the same transaction, if you're not very careful with
> locking...


From what I've seen, this problem can affect both surrogate and
natural key designs.  In both cases, care must be taken to ensure that
an underling tuple hasn't been changed by any other clients before it
attempts to commit its changed.   Probably the most common solution is
to use optimistic locking, another solution that I know of is to use
serialized transaction isolation.


--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug


В списке pgsql-sql по дате отправления:

Предыдущее
От: Glenn Maynard
Дата:
Сообщение: Re: changing multiple pk's in one update
Следующее
От: Glenn Maynard
Дата:
Сообщение: Re: changing multiple pk's in one update