Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nb39y-0003DS-5R for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Apr 2022 16:33:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nb39x-0002Aj-2o for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Apr 2022 16:33:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nb39w-0002Aa-PW for pgsql-hackers@lists.postgresql.org; Sun, 03 Apr 2022 16:33:00 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nb39u-0002p1-KO; Sun, 03 Apr 2022 16:32:59 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0EEC55C010E; Sun, 3 Apr 2022 12:32:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 03 Apr 2022 12:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=PQKgyrF3r1oEjpugno4+Vp6yq63mysIOARn3I2 Z84n8=; b=ltWzkZgjmWCnxKM1KCdgFDi5EElJXlcFuSiJ1qU2NjSJ08k+LyiuLL vVlGsDINIPQvljJYE9O0d7vcyM6BoAzJK4MrXjwuZor0b+7OipI2iL17nX2eyLFe BePf6bA3qVxgYubftC0wjCzD71FUHtcF9/5IgD+j0THZqoei0cjZD6VJewzs52Ar remMqBLKr928m4ZKk8j1xI0pGnBsbOuT5ZmMl5rHVDec0jBzTGl+NgBLn5m4JQo8 RivgnwV7ljOgfchPnshsQYDQrWONEFu6EKlU4P5f2l29JES1cXvfl2Zis+rhGKxA NuFjDV4ac29XgGaxccGDFewp2ylyiAGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=PQKgyrF3r1oEjpugn o4+Vp6yq63mysIOARn3I2Z84n8=; b=Hn2eZ4RPhsAf9C9nplsuP3J6GdLY/YRTq RG2zGT41ROPdfYYNUDyT3fcvQnq6eKVVBpoTYTpaM260RgWLnzFG467SBNUJpzbO yPBCOQ+4ct34E80lgKof6fGHSRKk/TVHFHJ4mQ0Erpeu0Cx3fZXJEag/qhoQ0TMw xHCxwcIAlaHlUd/44FRCkaJuTB/lmZ2zTN36vStfy+w66y+wboEyUv7TSLsm0xOa IY+cWPRnM+Eh/XrGcZd3ViG/iVYoozeaXfJtF0HktWoYqUwsAej21h8OJUX72Emx b0J/q3iUyCfwMzTzroF6ttUYxH70xBT7lqI9gCQEAWzufm9U2Dq/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejtddguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeff hfeuffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Apr 2022 12:32:57 -0400 (EDT) Date: Sun, 3 Apr 2022 09:32:56 -0700 From: Andres Freund To: Thomas Munro Cc: Justin Pryzby , John Naylor , Peter Geoghegan , pgsql-hackers , Robert Haas Subject: Re: A qsort template Message-ID: <20220403163256.ythjrgtwe2nbwajc@alap3.anarazel.de> References: <20220402202027.GG28503@telsasoft.com> <20220402210333.bwf4h375p4fxt5j6@alap3.anarazel.de> <20220402231151.635ohpc4q3gppdzb@alap3.anarazel.de> 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: Archived-At: Precedence: bulk Hi, On 2022-04-03 17:46:28 +1200, Thomas Munro wrote: > On Sun, Apr 3, 2022 at 11:11 AM Andres Freund wrote: > > On 2022-04-03 09:45:13 +1200, Thomas Munro wrote: > > > I think we just need to decide up front if we're in a situation that > > > can't provide datum1/isnull1 (in this case because it's an expression > > > index), and skip the optimised paths. Here's an experimental patch... > > > still looking into whether there are more cases like this... > > I didn't find anything else. > > Maybe it'd be better if we explicitly declared whether datum1 is used > in each tuplesort mode's 'begin' function, right next to the code that > installs the set of routines that are in control of that? Trying that > in this version. Is it clearer what's going on like this? Seems an improvement. > > I'm a bit worried that none of the !ubsan tests failed on this... > > In accordance with whoever-it-was-that-said-that's law about things > that aren't tested, this are turned out to be broken already[1]. Yea :/. Would be good to get this committed soon, so we can see further ubsan violations introduced in the next few days (and so I can unblock my local dev tests :P). Greetings, Andres Freund