pgsql: Restrict infomask bits to set on multixacts

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Restrict infomask bits to set on multixacts
Дата
Msg-id E1U12lS-0002Kj-Tt@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: pgsql: pg_upgrade docs: mention modification of postgresql.conf in new
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: pgrowlocks: fix bogus lock strength output