Re: Transaction Exception Question

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Transaction Exception Question
Date: 2002-08-14 21:48:31
Message-ID: 20020814174831.H15973@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-08-14 22:00:52 Re: PG 7.2.1 core dump
Previous Message Jon Swinth 2002-08-14 20:56:57 Re: Transaction Exception Question