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 1nakSR-0004wX-Nu for pgsql-committers@arkaria.postgresql.org; Sat, 02 Apr 2022 20:34:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nakRR-0000Ml-9z for pgsql-committers@arkaria.postgresql.org; Sat, 02 Apr 2022 20:33:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nakRR-0000Mc-2Y for pgsql-committers@lists.postgresql.org; Sat, 02 Apr 2022 20:33:49 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nakRP-0002A8-JF for pgsql-committers@lists.postgresql.org; Sat, 02 Apr 2022 20:33:48 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 7F40A5C004D; Sat, 2 Apr 2022 16:33:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 02 Apr 2022 16:33:46 -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=/q68KgqzjAoyRA9PI1luN5SqFSm8uLIqcBDdul l16FQ=; b=gS1nccSPPmTvVDB4Ipzd9ctITLCuJihxhHfLcBolzka5U21+M8el1m ipITUYin0b2gYa+eGEqA6BlymA8Q1c3eGKhyuncvJiuVwgCAZBcD4CqIi3pFetqZ xrcMPe67arJZHz/rCqzCl3FD3AObqS6tQIgjT5HR9oAhyf1eLYj3onOZp3JIOjGk TiV81EbwhWzvZCV6ANY9+hRzRTt50bN3r6V1Me7VrT82lPLlWUkH8Ael/kNJjebl C2Tcy27lHvFAsfY5KaaLfj21fhy3U+xUwwX8iYUM1TMIxBgDVMQ4zV82Nq4yKwv9 GLdCtPO5Vo+xB/BPaH6t6FXD9bpgjaOw== 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=/q68KgqzjAoyRA9PI 1luN5SqFSm8uLIqcBDdull16FQ=; b=o26i0WquiJWNNYDc088B86gwJh9AFy+Oc ibqsGq4bLCVjpErf7mL0pwgXPwHNd/CjW4C3cseW3g68df/1u7jweq7rRRTQzOxc gixC0zWSBWMiceHtz4HmfWTWJufZxDADxNJD1j2pEXq8Wa83070d1G7rnePQYrSf 6eA2ZZHA/lfXjVHQuBWl/6KdmsABWabMND4/jQ/pbavxwWlvR6b6Y3pdLYv8YIa4 i/vJBAXW+v3oZQm5Srr/2fNyQFcDWy1x0leTVrrC4dneD4ClzHfceJhVTvczYR5i vNBliCvCrWcI/CB9TLLL7Ox4LX+NUcYPie7/nSAP7Z7azSB9GWQ/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeikedgudehvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeff hfeuffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 2 Apr 2022 16:33:45 -0400 (EDT) Date: Sat, 2 Apr 2022 13:33:44 -0700 From: Andres Freund To: John Naylor Cc: John Naylor , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Specialize tuplesort routines for different kinds of abbreviated Message-ID: <20220402203344.ahup2u5n73cdbbcv@alap3.anarazel.de> References: <20220402201557.thanbsxcql5lk6pc@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220402201557.thanbsxcql5lk6pc@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-04-02 13:15:57 -0700, Andres Freund wrote: > There's definitely something borked - looks like this is ending up with bogus > pointers? Using rr to set a watchpoint on isnull1, and continuing backward I > see the memory written to with the following stack: Looks like it's just plain old uninitialized data. tuplesort_putheaptuple() doesn't compute SortTuple.{isnull1,datum1}. And comparetup_heap() doesn't rely on them being set. But tuplesort_sort_memtuples() will now bypass comparetup_heap(), so comparetup_heap computing those doesn't help anymore. Greetings, Andres Freund