From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Merge the various forms of transaction commit & abort records. |
Date: | 2015-03-23 14:56:06 |
Message-ID: | 20150323145606.GB15229@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On 2015-03-23 13:04:09 +0900, Michael Paquier wrote:
> On Mon, Mar 16, 2015 at 1:38 AM, Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-03-23 16:11:28 | pgsql: Don't delay replication for less than recovery_min_apply_delay's |
Previous Message | Andres Freund | 2015-03-23 14:54:19 | pgsql: Fix copy & paste error in 4f1b890b137. |