Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1empyn-0004JJ-3v for pgsql-committers@arkaria.postgresql.org; Sat, 17 Feb 2018 00:03:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1empyl-00079B-GP for pgsql-committers@arkaria.postgresql.org; Sat, 17 Feb 2018 00:03:47 +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 1empyl-00078y-BR; Sat, 17 Feb 2018 00:03:47 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1empye-00066X-1k; Sat, 17 Feb 2018 00:03:46 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8E65620D4F; Fri, 16 Feb 2018 19:03:38 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Fri, 16 Feb 2018 19:03:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=/z9DmY+AKVXBus17RczdOzcO5RqY0 OftCpXXOtTv2pI=; b=JF7qWink9L8coVfEuWfSTJ3l+yVr4i0oCBlzdjDqVFDpN h/SWJHJHqsbrF9PXkmz1sdKRYYZPt2R2Q6I02pdg4REimPYCqnHSHl3mHq6sSHVe VMKtUQ0LncA4fLCTAU40YhH88v4NldNQh6bLXdYJmnWRK7bJ1/BWhbqWXy7mKfUV TDGO9Bwc7/vx6dlfZiusxi2XQnCqabKvkPKNg8c7K8sCJSSHXNGZuyTu2i+N8BHd Aw+Wiht+IPjnAekNIAhPWclTFftgS+Acz9dArGl7QsAbD+2IHE8J46udiINpZCuV hhmCh22C7Ajk7kywEdREmcQK6xFvVBYizaywlZa+g== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 4ABDB7E34D; Fri, 16 Feb 2018 19:03:38 -0500 (EST) Date: Fri, 16 Feb 2018 16:03:37 -0800 From: Andres Freund To: pgsql-committers@postgresql.org, pgsql-hackers@postgresql.org, Robert Haas , Kohei KaiGai Subject: Re: pgsql: Do execGrouping.c via expression eval machinery, take two. Message-ID: <20180217000337.lfsdvro3l6ccsksp@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-02-16 22:48:39 +0000, Andres Freund wrote: > Do execGrouping.c via expression eval machinery, take two. > > This has a performance benefit on own, although not hugely so. The > primary benefit is that it will allow for to JIT tuple deforming and > comparator invocations. > > Large parts of this were previously committed (773aec7aa), but the > commit contained an omission around cross-type comparisons and was > thus reverted. > > Author: Andres Freund > Discussion: https://postgr.es/m/20171129080934.amqqkke2zjtekd4t@alap3.anarazel.de This triggered a failure on rhinoceros, in the sepgsql test: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&dt=2018-02-16%2023%3A45%3A02 The relevant diff is: + LOG: SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=system_u:object_r:sepgsql_proc_exec_t:s0 tclass=db_procedure name="pg_catalog.int4eq(integer,integer)" and that's because we now invoke the function access hook for grouping equal, which we previously didn't. I personally think the new behaviour makes more sense, but if somebody wants to argue differently? The only argument against I can see is that there's some other cases where also don't yet invoke it, but that seems weak. I never fully grasped the exact use-case for the function execute hook is, so maybe Kaigai and/or Robert could comment? Greetings, Andres Freund