On 2015-03-23 13:04:09 +0900, Michael Paquier wrote: > On Mon, Mar 16, 2015 at 1:38 AM, Andres Freund <[email protected]> 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 ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
