| From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
|---|---|
| To: | paolo romano <paolo(dot)romano(at)yahoo(dot)it> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: MultiXacts & WAL |
| Date: | 2006-06-17 11:05:16 |
| Message-ID: | Pine.OSF.4.61.0606171349020.307302@kosh.hut.fi |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2006-06-17 11:17:47 | Re: MultiXacts & WAL |
| Previous Message | Mark Woodward | 2006-06-17 10:48:00 | Re: Preventing DELETE and UPDATE without a WHERE clause? |