From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Avoid bogus TwoPhaseState locking sequences
Date: Wed, 14 Jun 2017 15:35:02 +0000
Message-ID: <E1dLAJy-0000Fl-OT@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Avoid bogus TwoPhaseState locking sequences
The optimized code in 728bd991c3c4 contains a few invalid locking
sequences. To wit, the original code would try to acquire an lwlock
that it already holds. Avoid this by moving lock acquisitions to
higher-level code, and install appropriate assertions in low-level that
the correct mode is held.
Authors: Michael Paquier, Álvaro Herrera
Reported-By: chuanting wang
Bug: #14680
Discussion: https://postgr.es/m/20170531033228.1487.10124@wrigleys.postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e90ceeaa495f5f40f224bcf84d2b0700eae8d7a3
Modified Files
--------------
src/backend/access/transam/twophase.c | 87 +++++++++++++++++++----------------
src/backend/access/transam/xact.c | 68 ++++++++++++++-------------
2 files changed, 83 insertions(+), 72 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Avoid bogus TwoPhaseState locking sequences
In-Reply-To: <E1dLAJy-0000Fl-OT@gemulon.postgresql.org>
References: <E1dLAJy-0000Fl-OT@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox