Re: SIREAD lock versus ACCESS EXCLUSIVE lock

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>, simon@2ndquadrant.com, drkp@csail.mit.edu, pgsql-hackers@postgresql.org
Date: 2011-06-07T14:20:13Z
Lists: pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> It makes me a bit uncomfortable to do catalog cache lookups while 
> holding all the lwlocks. We've also already removed the reserved entry 
> for scratch space while we do that - if a cache lookup errors out, we'll 
> leave behind quite a mess. I guess it shouldn't fail, but it seems a bit 
> fragile.

The above scares the heck out of me.  If you don't believe that a
catcache lookup will ever fail, I will contract to break the patch.
You need to rearrange the code so that this is less fragile.

			regards, tom lane