pgsql: Fix TwoPhaseGetDummyBackendId(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix TwoPhaseGetDummyBackendId().
Date
Msg-id E1Sz8YP-0004kc-Ul@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix TwoPhaseGetDummyBackendId().

This was broken in commit ed0b409d22346b1b027a4c2099ca66984d94b6dd,
which revised the GlobalTransactionData struct to not include the
associated PGPROC as its first member, but overlooked one place where
a cast was used in reliance on that equivalence.

The most effective way of fixing this seems to be to create a new function
that looks up the GlobalTransactionData struct given the XID, and make
both TwoPhaseGetDummyBackendId and TwoPhaseGetDummyProc rely on that.

Per report from Robert Ross.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5cf2307c98f6daeac3d42e74f4e2d46ab3bf0a80

Modified Files
--------------
src/backend/access/transam/twophase.c |   76 ++++++++++++++++++++-------------
1 files changed, 46 insertions(+), 30 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix TwoPhaseGetDummyBackendId().
Next
From: Tom Lane
Date:
Subject: pgsql: Update isolation tests' README file.