Unbreak lock conflict detection for Hot Standby.

Robert Haas <rhaas@postgresql.org>

Commit: d8c3896626e9fa48c9ebadc31850d54a791a08e3
Author: Robert Haas <rhaas@postgresql.org>
Date: 2013-01-18T16:52:28Z
Releases: 9.3.0
Unbreak lock conflict detection for Hot Standby.

This got broken in the original fast-path locking patch, because
I failed to account for the fact that Hot Standby startup process
might take a strong relation lock on a relation in a database to
which it is not bound, and confused MyDatabaseId with the database
ID of the relation being locked.

Report and diagnosis by Andres Freund.  Final form of patch by me.

Files

PathChange+/−
src/backend/storage/lmgr/lock.c modified +6 −6