Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUbMM-00022u-CY for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Mar 2014 12:30:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WUbML-0002dZ-Nr for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Mar 2014 12:30:37 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUbMJ-0002ae-Bg for pgsql-hackers@postgresql.org; Mon, 31 Mar 2014 12:30:35 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUbMG-00076Q-DE for pgsql-hackers@postgresql.org; Mon, 31 Mar 2014 12:30:34 +0000 Received: from intern.anarazel.de (p54AF498E.dip0.t-ipconnect.de [84.175.73.142]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 55CB54E8003; Mon, 31 Mar 2014 14:30:31 +0200 (CEST) Date: Mon, 31 Mar 2014 14:30:30 +0200 From: Andres Freund To: Alvaro Herrera Cc: Stephen Frost , pgsql-hackers@postgresql.org Subject: Re: MultiXactId error after upgrade to 9.3.4 Message-ID: <20140331123030.GB18358@alap3.anarazel.de> References: <20140330040029.GY4582@tamriel.snowman.net> <20140330141135.GA4582@tamriel.snowman.net> <20140330185349.GD4582@tamriel.snowman.net> <20140331115452.GT9567@eldon.alvh.no-ip.org> <20140331115713.GA18358@alap3.anarazel.de> <20140331121912.GU9567@eldon.alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140331121912.GU9567@eldon.alvh.no-ip.org> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2014-03-31 09:19:12 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > On 2014-03-31 08:54:53 -0300, Alvaro Herrera wrote: > > > My conclusion here is that some part of the code is failing to examine > > > XMAX_INVALID before looking at the value stored in xmax itself. There > > > ought to be a short-circuit. Fortunately, this bug should be pretty > > > harmless. > > > > > > .. and after looking, I'm fairly sure the bug is in > > > heap_tuple_needs_freeze. > > > > heap_tuple_needs_freeze() isn't *allowed* to look at > > XMAX_INVALID. Otherwise it could miss freezing something still visible > > on a standby or after an eventual crash. > > Ah, you're right. It even says so on the comment at the top (no > caffeine yet.) But what it's doing is still buggy, per this report, so > we need to do *something* ... Are you sure needs_freeze() is the problem here? IIRC it already does some checks for allow_old? Why is the check for that not sufficient? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers