Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUy5e-0002G4-Nx for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Nov 2019 19:14:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iUy5c-00074v-Cd for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Nov 2019 19:14:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUy5c-00074o-1h for pgsql-bugs@lists.postgresql.org; Wed, 13 Nov 2019 19:14:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iUy5V-0002RZ-EC for pgsql-bugs@lists.postgresql.org; Wed, 13 Nov 2019 19:14:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xADJDpNS009797; Wed, 13 Nov 2019 14:13:51 -0500 From: Tom Lane To: Andres Freund cc: Ranier Vilela , "pgsql-bugs@lists.postgresql.org" Subject: Re: [BUG] Uninitializaed configOut.leafType used. In-reply-to: <20191113182013.3rpzaozpqisnzzps@alap3.anarazel.de> References: <32631.1573665493@sss.pgh.pa.us> <20191113180320.gl27ldjjgex2x6ad@alap3.anarazel.de> <20191113182013.3rpzaozpqisnzzps@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 13 Nov 2019 10:20:13 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9795.1573672431.1@sss.pgh.pa.us> Date: Wed, 13 Nov 2019 14:13:51 -0500 Message-ID: <9796.1573672431@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > It certainly could be more obvious. I'm not a fan of the spgist code :(. Yeah. The claimed problem is unreachable, because the only way to get there is for configOutLefttype/configOutRighttype to have been set to something valid by a previous execution of the SPGIST_CONFIG_PROC case. However, if the proclist members don't appear in numerical sequence, we'd get a bogus failure because the "ok = false" path would be taken. That "if" is true normally because of the way the catcache works, but I think it's possible to make it fail if you disable system index usage. Not a realistic scenario in practice, but less robust than I'd like. Can't get terribly excited about fixing it though. regards, tom lane