From: Nikhil Sontakke <nikhils@2ndquadrant.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Store 2PC GID in commit/abort WAL recs for logical decoding
Date: Thu, 14 Jun 2018 16:32:06 +0530
Message-ID: <CAMGcDxey6dG1DP34_tJMoWPcp5sPJUAL4K5CayUUXLQSx2GQpA@mail.gmail.com> (raw)
In-Reply-To: <6a9bcfd5-880d-9442-fed2-695ba8ef50f3@iki.fi>
References: <E1f1EEd-000851-3T@gemulon.postgresql.org>
<33b787bf-dc20-1161-54e9-3f3b607bf59d@iki.fi>
<20180410072435.GE26769@paquier.xyz>
<6a9bcfd5-880d-9442-fed2-695ba8ef50f3@iki.fi>
Hi Heikki,
>
> Pushed, thanks for the review!
>
There was a slight oversight in the twophase_gid length calculation in
the XactLogCommitRecord() code path in the cf5a1890592 commit. The
corresponding XactLogAbortRecord() code path was ok. PFA, a small
patch to fix the oversight.
Regards,
Nikhils
--
Nikhil Sontakke http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachments:gid_length.patch (application/octet-stream, 576B) downloaddiff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.cindex f4e5ea84b9..b51eeb087e 100644--- a/src/backend/access/transam/xact.c+++ b/src/backend/access/transam/xact.c@@ -5365,7 +5365,7 @@ XactLogCommitRecord(TimestampTz commit_time,
{
XLogRegisterData((char *) (&xl_twophase), sizeof(xl_xact_twophase));
if (xl_xinfo.xinfo & XACT_XINFO_HAS_GID)
- XLogRegisterData((char *) twophase_gid, strlen(twophase_gid));+ XLogRegisterData((char *) twophase_gid, strlen(twophase_gid) + 1);
}
if (xl_xinfo.xinfo & XACT_XINFO_HAS_ORIGIN)
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: nikhils@2ndquadrant.com, hlinnaka@iki.fi, michael@paquier.xyz, simon@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: pgsql: Store 2PC GID in commit/abort WAL recs for logical decoding
In-Reply-To: <CAMGcDxey6dG1DP34_tJMoWPcp5sPJUAL4K5CayUUXLQSx2GQpA@mail.gmail.com>
References: <E1f1EEd-000851-3T@gemulon.postgresql.org> <33b787bf-dc20-1161-54e9-3f3b607bf59d@iki.fi> <20180410072435.GE26769@paquier.xyz> <6a9bcfd5-880d-9442-fed2-695ba8ef50f3@iki.fi> <CAMGcDxey6dG1DP34_tJMoWPcp5sPJUAL4K5CayUUXLQSx2GQpA@mail.gmail.com>
* 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