Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wd1tz-0007hn-QO for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Apr 2014 18:28:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wd1tz-0008JY-AG for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Apr 2014 18:28:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wd1ty-0008JQ-2T for pgsql-hackers@postgresql.org; Wed, 23 Apr 2014 18:28:10 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wd1tu-0007FR-Sg for pgsql-hackers@postgresql.org; Wed, 23 Apr 2014 18:28:09 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Wd1ts-0005d9-Uw; Wed, 23 Apr 2014 14:28:04 -0400 Date: Wed, 23 Apr 2014 14:28:04 -0400 From: Bruce Momjian To: Alvaro Herrera Cc: Andres Freund , Stephen Frost , pgsql-hackers@postgresql.org Subject: Re: MultiXactId error after upgrade to 9.3.4 Message-ID: <20140423182804.GA21458@momjian.us> 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> <20140423180102.GP25695@eldon.alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140423180102.GP25695@eldon.alvh.no-ip.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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 Wed, Apr 23, 2014 at 03:01:02PM -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. > > I think what we should do here is that if we see that XMAX_INVALID is > set, we just reset everything to zero without checking the multixact > contents. Something like the attached (warning: hand-edited, line > numbers might be bogus) > > I still don't know under what circumstances this situation could arise. > This seems most strange to me. I would wonder about this to be just > papering over a different bug elsewhere, except that we know this tuple > comes from a pg_upgraded table and so I think the only real solution is > to cope. Shouldn't we log something at least if we are unsure of the cause? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers