Restrict infomask bits to set on multixacts
We must only set the bit(s) for the strongest lock held in the tuple;
otherwise, a multixact containing members with exclusive lock and
key-share lock will behave as though only a share lock is held.
This bug was introduced in commit 0ac5ad5134, somewhere along
development, when we allowed a singleton FOR SHARE lock to be
implemented without a MultiXact by using a multi-bit pattern.
I overlooked that GetMultiXactIdHintBits() needed to be tweaked as well.
Previously, we could have the bits for FOR KEY SHARE and FOR UPDATE
simultaneously set and it wouldn't cause a problem.
Per report from digoal@126.com
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/b78647a0e6f7b110273e98601f26d3d1db0ad931
Modified Files
--------------
src/backend/access/heap/heapam.c | 46 ++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 9 deletions(-)