Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2uYy-0003Sr-8R for pgsql-committers@arkaria.postgresql.org; Fri, 13 Oct 2017 07:39:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2uYx-0007iq-L0 for pgsql-committers@arkaria.postgresql.org; Fri, 13 Oct 2017 07:39:19 +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 1e2uYx-0007ig-2K for pgsql-committers@postgresql.org; Fri, 13 Oct 2017 07:39:19 +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 1e2uYu-0001W3-52 for pgsql-committers@postgresql.org; Fri, 13 Oct 2017 07:39:17 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 742D420AA9; Fri, 13 Oct 2017 03:39:15 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Fri, 13 Oct 2017 03:39:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=NeoO33nFH8W8yxDs0WUy6mhPwkKkp 9MKfih6E2N7cHY=; b=ZAL+1XyTI4tmcTSQX7WsV4vT2W6op35W3d3Wnxxdphv3e hzLM/XiE9Vd7NPGMkCGY1e3B+Ppa4fCfmSXkb5bn54Xm/0In4Nw9lcs6SYprrO8n jzyTPzeiw6wDTWfTGCLKnc6nLdq7eAT4YtOBS3572l7G/eeSKVQ0hJ1N4Ggj7U5M 4UHWzEYgTzVuLINWmY14kQHiDtsKyTXXJ1B9OL/3D5WwhpMEAr4UvIpsMNZCWGY+ hRrv201A6O8snrvEFuaM6H5xsjpDSKX9OlKMyyMs3YFx+Yg2TYFLvhoJlNNDOSQG 8q63zUOoXVOFGCHG4WgMzl9vJcXguvywpw4ZeHrOA== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 2C0D32479F; Fri, 13 Oct 2017 03:39:15 -0400 (EDT) Date: Fri, 13 Oct 2017 00:39:14 -0700 From: Andres Freund To: Noah Misch Cc: Tom Lane , pgsql-committers@postgresql.org Subject: Re: pgsql: Improve performance of SendRowDescriptionMessage. Message-ID: <20171013073914.2te4tfm4abn2q3be@alap3.anarazel.de> References: <307.1507819498@sss.pgh.pa.us> <20171012230844.ye4tnye2shysvqpk@alap3.anarazel.de> <20171013023536.GA492146@rfd.leadboat.com> <12267.1507862660@sss.pgh.pa.us> <20171013070247.GA505228@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171013070247.GA505228@rfd.leadboat.com> 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 Hi, On 2017-10-13 00:02:47 -0700, Noah Misch wrote: > I hacked psql to call PQtrace() and ran "psql -Xc 'select true'" in the > defective configuration and in a working x64 GNU/Linux configuration. I've > attached both PQtrace() products. Thanks! > To backend> Msg Q > To backend> "select true" > To backend> Msg complete, length 17 > From backend> T > From backend (#4)> 17 > From backend (#2)> 1 > From backend> "bool" > From backend (#4)> 1 > From backend (#2)> 0 > From backend (#4)> 1140850688 > From backend (#2)> 2816 > From backend (#4)> 16777216 > From backend (#2)> 372 > From backend> D > From backend (#4)> 11 > From backend> C > From backend (#4)> 13 > From backend> "SELECT 1" > From backend> Z > From backend (#4)> 5 > From backend> Z > From backend (#4)> 5 > From backend> I > To backend> Msg X > To backend> Msg complete, length 5 > To backend> Msg Q > To backend> "select true" > To backend> Msg complete, length 17 > From backend> T > From backend (#4)> 29 > From backend (#2)> 1 > From backend> "bool" > From backend (#4)> 0 > From backend (#2)> 0 > From backend (#4)> 16 > From backend (#2)> 1 > From backend (#4)> -1 > From backend (#2)> 0 > From backend> D > From backend (#4)> 11 > From backend (#2)> 1 > From backend (#4)> 1 > From backend (1)> t > From backend> C > From backend (#4)> 13 > From backend> "SELECT 1" > From backend> Z > From backend (#4)> 5 > From backend> Z > From backend (#4)> 5 > From backend> I > To backend> Msg X > To backend> Msg complete, length 5 That's certainly quite weird. I can't immediately pinpoint where the bug is. I initially thought that the StringInfo's lengths might be wrong, but that doesn'tqutie seem to make sense. Looks a bit like there's just garbless mess in there... Will have another look when I don't have to force my eyes to stay open. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers