Re: Transaction Exception Question

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Transaction Exception Question
Дата
Msg-id 20020814174831.H15973@mail.libertyrms.com
обсуждение исходный текст
Ответ на Re: Transaction Exception Question  (Jon Swinth <jswinth@atomicpc.com>)
Список pgsql-general
On Wed, Aug 14, 2002 at 01:56:57PM -0700, Jon Swinth wrote:
> ah, now I understand where you got FK from.  The transaction exeception I run
> into most often is caused by an Unique Key (not the PK either).  An insert
> will block on UK violation when the existing record has been inserted from a
> non-complete transaction.

Ok, so these are just separate issues.  Sorry, I'm especially dim
this week (we're moving offices is my best excuse).

> As for your pending and posted idea, are you proposing to not have FK on the
> pending table?  What do I do when the order fails an FK when moving from
> pending to posted?  The whole point of the transaction is that when I am
> done, everything is updated properly or nothing is updated.

No, you should have the FKs on the pending table.  Hmm.  I see, now:
the problem may be related also to the long-running transaction,
because you end up having to take the lock for the duration.  So
never mind all of what I said.

> Based on what I know of Postgre so far, there are two ways to solve the FK
> lock issues.  Both require that the concept of read lock be added to the core
> of postgre.

Yes, I think this is right.  And yes, that lock mechanism would be
valuable.

A

--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110


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

Предыдущее
От: Jon Swinth
Дата:
Сообщение: Re: Transaction Exception Question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PG 7.2.1 core dump