Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ya3m2-0000pe-BS for pgsql-committers@arkaria.postgresql.org; Mon, 23 Mar 2015 14:56:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ya3m1-00032e-R2 for pgsql-committers@arkaria.postgresql.org; Mon, 23 Mar 2015 14:56:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ya3m1-00032X-6b for pgsql-committers@postgresql.org; Mon, 23 Mar 2015 14:56:13 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ya3lw-0003LA-DN for pgsql-committers@postgresql.org; Mon, 23 Mar 2015 14:56:11 +0000 Received: from intern.anarazel.de (p5DDC60D1.dip0.t-ipconnect.de [93.220.96.209]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 5754B860001; Mon, 23 Mar 2015 15:56:07 +0100 (CET) Date: Mon, 23 Mar 2015 15:56:06 +0100 From: Andres Freund To: Michael Paquier Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Merge the various forms of transaction commit & abort records. Message-ID: <20150323145606.GB15229@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2015-03-23 13:04:09 +0900, Michael Paquier wrote: > On Mon, Mar 16, 2015 at 1:38 AM, Andres Freund 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