Re: augmenting MultiXacts to improve foreign keys - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: augmenting MultiXacts to improve foreign keys
Date
Msg-id 64B402D3-368C-48EE-AA4B-879F4004F3B2@phlo.org
Whole thread Raw
In response to augmenting MultiXacts to improve foreign keys  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Aug9, 2011, at 19:01 , Alvaro Herrera wrote:
> This would also help us find a solution to the problem that an aborted
> subtransaction that updates or excl-locks a tuple causes an earlier
> shared lock to be forgotten.  We would deal with this by marking the
> Xmax with a new MultiXact that includes both the lock and the update.
> This means that this MultiXact would have to be WAL-logged.  I would
> leave that for a later patch, but I think it's good that there's a way
> to fix it.

Yeah, I pondered something similar in the past, but never got around to
figuring out the details.

This would also allow us to modify the behaviour of tuple locks under
isolation level REPEATABLE READ to throw a serialization error if the
row was locked by an invisible transaction. Doing so would allow us to
get rid of the strange re-checking logic that RI triggers must currently
use in REPEATABLE READ mode, and would thus make it possible to implement
custom RI triggers in PL/pgSQL.

I'll try to find some time to check how that fits in with the new
per-tuple lock levels you proposed.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: augmenting MultiXacts to improve foreign keys
Next
From: Florian Pflug
Date:
Subject: Re: augmenting MultiXacts to improve foreign keys