Re: MultiXacts & WAL

From: paolo romano <paolo(dot)romano(at)yahoo(dot)it>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: MultiXacts & WAL
Date: 2006-06-17 17:37:18
Message-ID: 20060617173718.63055.qmail@web27809.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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.

Releasing shared locks (whether used for plain reading or enforcing foreign keys) before transaction end would be clearly wrong.
The original point I was moving is if there were any concrete reason (which still I can't see) to require Multixacts recoverability (by means of logging).
Concerning the prepare state of two phase commit, as I was pointing out in my previous post, shared locks can safely be released once a transaction gets precommitted, hence they do not have to be made durable.

Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-17 17:43:06 Re: Test request for Stats collector performance improvement
Previous Message Jim Nasby 2006-06-17 17:33:09 Re: postgresql and process titles