Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2u08-0001Y9-OE for pgsql-committers@arkaria.postgresql.org; Fri, 13 Oct 2017 07:03: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 1e2u08-0005VF-2a for pgsql-committers@arkaria.postgresql.org; Fri, 13 Oct 2017 07:03:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2tzs-00054e-Kt for pgsql-committers@postgresql.org; Fri, 13 Oct 2017 07:03:04 +0000 Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e2tzh-0002p5-8g for pgsql-committers@postgresql.org; Fri, 13 Oct 2017 07:03:04 +0000 Received: by mail-pf0-x232.google.com with SMTP id n89so1114876pfk.11 for ; Fri, 13 Oct 2017 00:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mPZY9AhOCyZe7e+RUb2Az0VG83SoezMOPjgAHmiB1xo=; b=EmhoiEFjIF1zPkuJ2qt49qqa6/n4QgbxZfJFE/AdG0gtBw9OIAcpGITGmojUQti6k7 EtnX02KHPSXM8WvN5LXD5aHoNqEvBOLBFg0KnQ4ngeXtEhvAYes/DyHMUSPan5K0PGud PC9+xmcwfmurq3ntO59wz7INQDVwbpq1cAlLo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mPZY9AhOCyZe7e+RUb2Az0VG83SoezMOPjgAHmiB1xo=; b=D7dXjaOLfIdknmVaZUyzcUbEZq762G/ZDrMvojzHdHKdzhjm2AQPiE22FkffkAS3xn 6LmquOOWgSRHzBiZv/ze/ikDizA6hYf18TY9nPTOEw3vp97kryfUJQEP+D1A8opmxBqk NdQyo9BDkJTCxhhNk1P5xGqXb1ozTIgfmtbe5wbAda9GlHQz5H5kGNgkKUaVRGqUY4Z+ zdNvfcufIGDRyYzerT6nSR/PjLJTrd21Sh196j2/5dE3UnMzoZ2dLcgzI1qjmXNjezvu RaYywJoF26hiURQKHokCLNjEmN0TUPz65IhOB9kAUpD1I+sMfJLJsD+xfZYKtHECKhuM /Kvw== X-Gm-Message-State: AMCzsaXR9vaYADNPDOis8U0eIdaaRYthHOeu7a0sojtM2oGPr00SCxF4 4l4yd/o25g4FV7bl7X15QYbcrA== X-Google-Smtp-Source: AOwi7QCilgpCAyOoxV+EZVaND2zQXkC+fVzVA0MxzsJd5KNleEQNCWM9WsWINd/E7oZeJwSGJKb3YA== X-Received: by 10.84.241.131 with SMTP id b3mr540299pll.103.1507878171149; Fri, 13 Oct 2017 00:02:51 -0700 (PDT) Received: from rfd.leadboat.com (c-73-158-248-138.hsd1.ca.comcast.net. [73.158.248.138]) by smtp.gmail.com with ESMTPSA id k7sm844404pgp.52.2017.10.13.00.02.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 00:02:49 -0700 (PDT) Date: Fri, 13 Oct 2017 00:02:47 -0700 From: Noah Misch To: Tom Lane Cc: Andres Freund , pgsql-committers@postgresql.org Subject: Re: pgsql: Improve performance of SendRowDescriptionMessage. Message-ID: <20171013070247.GA505228@rfd.leadboat.com> References: <307.1507819498@sss.pgh.pa.us> <20171012230844.ye4tnye2shysvqpk@alap3.anarazel.de> <20171013023536.GA492146@rfd.leadboat.com> <12267.1507862660@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <12267.1507862660@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) 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 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In an earlier message, I said I didn't see the problem with xlc 13.1.3. I withdraw that statement. I had tested old code (commit c629324, 20 Aug), rendering the test invalid. xlc 13.1.3 does break commit 91d5f1a, and removing "restrict" fixes things as it did the older version. On Thu, Oct 12, 2017 at 10:44:20PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Thu, Oct 12, 2017 at 04:08:44PM -0700, Andres Freund wrote: > >> Noah, any chance you could force restrict to off on that animal? > > > I can confirm it allows "make check" to pass. > > So that leaves us with two theories: > > 1. hornet's compiler contains a bug that causes it to misoptimize > in the presence of "restrict". > > 2. There's a bug in the way HEAD is applying "restrict", which happens > not to manifest on other platforms. > > While I have to agree with Andres' evident feeling that it's probably > #1, I do not think we should dismiss #2 without inquiring a bit > harder. It would be really useful, I think, if we could characterize > exactly how the RowDescription output is broken in that build. > Noah, could you capture some of those messages somehow? 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. --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="extraneous-xlc-aix.pqtrace" To backend> Msg Q To backend> "select true" To backend> Msg complete, length 17