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 1nakVp-00058X-Nx for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Apr 2022 20:38:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nakVo-0004Ub-JR for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Apr 2022 20:38:20 +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 1nakVo-0004US-8K for pgsql-hackers@lists.postgresql.org; Sat, 02 Apr 2022 20:38:20 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nakVm-0002D0-UW; Sat, 02 Apr 2022 20:38:19 +0000 Received: by mail-il1-x12a.google.com with SMTP id m17so226292ilj.13; Sat, 02 Apr 2022 13:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9+FVIQyDl1IqFJa1GAXgLYZcBNHnTDEF2qZ9Uygd7O8=; b=ZWIh8+eNl/p0QU+7VfWeY77e+4pASNJBTx2DD1XUc5BsWotsW0buC04TU6O2dk/jD2 H/oDkI1jtWKLqgTm7YacyROS4zkPh69oUhndOsNhDPboYhYb5w88PrVsADTJVVR6I1WY qkNOwdRRVLbC2wgX1jMNWFa4J98B0kYiSbVMAhlQJ2q+zBtpNq7iKrbj9UeSGd+4pE// X2qpcRLR1Ypylo/RtdOT+HQD0OUew575zvRlmRrnpeKaOndWHhqPA6Qe/H+msjlVqgGq rCXG7NrcL1FQx2WAnnBzQyKI+TiS3oYwXVhqkpeF/H5S8NED5Ytfsr4SmW+DCWWNc2Um xoyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9+FVIQyDl1IqFJa1GAXgLYZcBNHnTDEF2qZ9Uygd7O8=; b=jVIcDzgsZt6P4YlU8uXD4R5jYAdLCL6ylF58XH93rUnWHiaOiMSddGZ2+brrpA8/3c 3qiNNq0VnUudvwEu70ONEjnzdg4qWDeCl96aQRSYuVG7gpNFwUeB+J8QXe5XaIVplK+Y z2dYbxEcGkrhq++XtxPDjaUfkwoIp3684/mJ/zv0ryCqNIAHvxgOUC+yDaRqqhEbBBsX paRrZizpxmnJW3mHqFFD9sNaxFAxZHQV0TphuSXTqZUyQdp8g5R11A1YqeTNoYUgJ+h0 QGjioZLOfQzG/xJb4loroSqEWirO1AzZLoL6JyHsQreRXe4yod12Ivu4Z1/cDigxOvjq 12qg== X-Gm-Message-State: AOAM5321SqfKa7zG4w4JeAOpNaVKtc/sCnQvSCu3ejo0SpD1vPYD/Irh p90iJl6w5k93xwelVDPQUlb8hdBuQJuXD69ltGI= X-Google-Smtp-Source: ABdhPJxUGpu+J3HY6Si3eRpa79mcdJeyaPjnJsQTP+RE/WpA4fLcyoi1rhTFfznx0YMWY46gA/yUFkDBtf8yp5gTCLE= X-Received: by 2002:a05:6e02:ece:b0:2ca:1b6b:6180 with SMTP id i14-20020a056e020ece00b002ca1b6b6180mr2464362ilk.316.1648931897410; Sat, 02 Apr 2022 13:38:17 -0700 (PDT) MIME-Version: 1.0 References: <20220402202027.GG28503@telsasoft.com> In-Reply-To: <20220402202027.GG28503@telsasoft.com> From: Thomas Munro Date: Sun, 3 Apr 2022 08:37:40 +1200 Message-ID: Subject: Re: A qsort template To: Justin Pryzby Cc: John Naylor , Peter Geoghegan , pgsql-hackers , Robert Haas Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Apr 3, 2022 at 8:20 AM Justin Pryzby wrote: > @@ -4126,22 +4126,23 @@ copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup) > + stup->isnull1 = false; Looks like I might have failed to grok the scheme for encoding null into SortTuple objects. It's clearly uninitialised in some paths, with a special 0 value in datum1. Will need to look more closely with more coffee...