Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqpfd-0001hM-0L for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Apr 2016 22:23:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aqpfa-0001Iy-Up for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Apr 2016 22:23:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqpex-0000bY-Ne for pgsql-bugs@postgresql.org; Thu, 14 Apr 2016 22:22:47 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqpev-0007Ie-3n for pgsql-bugs@postgresql.org; Thu, 14 Apr 2016 22:22:46 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 020E42087F for ; Thu, 14 Apr 2016 18:22:43 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 14 Apr 2016 18:22:44 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=L/Z76dnebb7gcKHSgCNuhFMxT+s=; b=CANgM YKQGqFzhsaq1MrkoUYd9W6uQ8zLXrEmZqU0Ff+OcbgSK09z6/9h26OffZuQhXx8n vb5xl6JDoEgjlvRuQNci2DptbIJkIkV94hyRTwey8My6YIPVTcCtsBxjOj1nTapU TTUnrYknVDmNx6AWxYuyJ3lg3yyvGmEdP+S1GA= X-Sasl-enc: JUCxvXfr15yjDi/ZwDyuxf8Q2KF7I8pRKLPPE/q1Znez 1460672563 Received: from intern.anarazel.de (unknown [184.23.178.130]) by mail.messagingengine.com (Postfix) with ESMTPA id 9958F68027E; Thu, 14 Apr 2016 18:22:43 -0400 (EDT) Date: Thu, 14 Apr 2016 15:22:42 -0700 From: Andres Freund To: Tom Lane Cc: Christoph Berg , PostgreSQL Bugs Subject: Re: Bus error in pg_logical_slot_get_changes (9.4.7, sparc) Message-ID: <20160414222242.ec4m74aqsh4eshde@alap3.anarazel.de> References: <20160413211152.GA21711@msg.credativ.de> <20160413175827.dmlbtdf7c3mgmnex@alap3.anarazel.de> <20160414092919.GA11804@msg.df7cb.de> <20160414112518.GE11804@msg.df7cb.de> <423.1460653903@sss.pgh.pa.us> <20160414183602.GA22486@msg.df7cb.de> <15040.1460661277@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15040.1460661277@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2016-04-14 15:14:37 -0400, Tom Lane wrote: > I've been looking around and testing some more. I noticed that the only > caller of ReorderBufferRestoreChange always passes a maxaligned buffer, > so most of the changes I suggested are unnecessary. AFAICT, it's only > the second fetch of t_len that is at any risk. I think so too. And I agree that a comment about this would have been rather helpful... > Even there, at least in > HEAD, I cannot construct a test case in which the first tuple's t_len is > not a multiple of 4. That's really kinda weird. It's a tuple from WAL, and the length's from the record; the same way wal replay gets it. Wonder if this might not indicate a relevant bug somewhere... > I have a suspicion that > something in the impenetrable thicket that passes for prefix/suffix > optimization in log_heap_update is forcing the WAL-logged tuple length to > be rounded off to sizeof(int) (*not* MAXALIGN). I don't think so, because the prefix optimization is essentially disabled for logical... > So I now think my previous patch is overkill, and we should instead use > something like the attached. Looks good to me. Thanks! - Andres -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs