Re: FOR SHARE vs FOR UPDATE locks
Alvaro Herrera <alvherre@commandprompt.com>
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
Date: 2006-12-01T11:37:11Z
Lists: pgsql-hackers, pgsql-docs
Simon Riggs wrote: > ISTM that multitrans could be used here. Two xids, one xmax. Hmm, yeah, this seems a reasonable suggestion. The problem is that we don't have a mechanism today for saying "this Xid holds a shared lock, this one holds an exclusive lock". So code-wise it wouldn't be simple to do. It's a single bit per Xid, but I don't see where to store such a thing. I'm not sure we can use the simple "raise an ERROR" answer though, because for users that would be a regression. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support