From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Merge the various forms of transaction commit & abort records.
Date: Mon, 23 Mar 2015 15:56:06 +0100
Message-ID: <20150323145606.GB15229@alap3.anarazel.de> (raw)
In-Reply-To: <CAB7nPqT6BO1cCn+sAyDByBxA4EKZNAiPi2mFJ=ANeZmnmewRyg@mail.gmail.com>
References: <E1YXBZ5-0006cK-Ac@gemulon.postgresql.org>
<CAB7nPqT6BO1cCn+sAyDByBxA4EKZNAiPi2mFJ=ANeZmnmewRyg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
On 2015-03-23 13:04:09 +0900, Michael Paquier wrote:
> On Mon, Mar 16, 2015 at 1:38 AM, Andres Freund <andres@anarazel.de> wrote:
> > Merge the various forms of transaction commit & abort records.
>
> Coverity is complaining about the following block of code:
> + xact_info = XLogRecGetInfo(record) & XLOG_XACT_COMMIT;
> +
> + if (xact_info != XLOG_XACT_COMMIT &&
> + xact_info != XLOG_XACT_COMMIT_PREPARED)
> return false;
>
> Instead of XLOG_XACT_COMMIT, shouldn't this function use XLOG_XACT_OPMASK?
That's a neat catch (by you and coverity). I wish we had automated test
infrastructure for this stuff (hint hint ;)). It's hard to remember to
test both normal and prepared xacts in all of the different scenarios.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
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: andres@anarazel.de, michael.paquier@gmail.com
Subject: Re: pgsql: Merge the various forms of transaction commit & abort records.
In-Reply-To: <20150323145606.GB15229@alap3.anarazel.de>
References: <E1YXBZ5-0006cK-Ac@gemulon.postgresql.org> <CAB7nPqT6BO1cCn+sAyDByBxA4EKZNAiPi2mFJ=ANeZmnmewRyg@mail.gmail.com> <20150323145606.GB15229@alap3.anarazel.de>
* 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