Re: MultiXacts & WAL - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: MultiXacts & WAL
Date
Msg-id Pine.OSF.4.61.0606171349020.307302@kosh.hut.fi
Whole thread Raw
In response to Re: MultiXacts & WAL  (paolo romano <paolo.romano@yahoo.it>)
Responses Re: MultiXacts & WAL  (paolo romano <paolo.romano@yahoo.it>)
List pgsql-hackers
On Sat, 17 Jun 2006, paolo romano wrote:

> When a transaction enters (successfully) the prepared state it only 
> retains its exclusive locks and releases any shared locks (i.e. 
> multixacts)... or, at least, that's how it should be in principle 
> according to serializiaton theory, i haven't yet checked out if this is 
> what is done in postgresql .

In PostgreSQL, shared locks are not taken when just reading data. They're 
used to enforce foreign key constraints. When inserting a row to a table 
with a foreign key, the row in the parent table is locked to 
keep another transaction from deleting it. It's not safe to release the 
lock before end of transaction.

- Heikki


pgsql-hackers by date:

Previous
From: "Mark Woodward"
Date:
Subject: Re: Preventing DELETE and UPDATE without a WHERE clause?
Next
From: Heikki Linnakangas
Date:
Subject: Re: MultiXacts & WAL