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 1ifOle-0008Ha-N0 for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Dec 2019 13:44:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ifOlc-0001q6-U9 for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Dec 2019 13:44:32 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1ifOlc-0001pz-M4 for pgsql-bugs@lists.postgresql.org; Thu, 12 Dec 2019 13:44:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ifOla-00068a-17 for pgsql-bugs@lists.postgresql.org; Thu, 12 Dec 2019 13:44:32 +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 xBCDiMHO026142; Thu, 12 Dec 2019 08:44:22 -0500 From: Tom Lane To: Tomas Vondra cc: kunert@cms.hu-berlin.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16162: create index using gist_trgm_ops leads to panic In-reply-to: <20191212125023.vpk6zbbeldzmyerc@development> References: <16162-45d21b7b6c1a3105@postgresql.org> <20191212125023.vpk6zbbeldzmyerc@development> Comments: In-reply-to Tomas Vondra message dated "Thu, 12 Dec 2019 13:50:23 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26140.1576158262.1@sss.pgh.pa.us> Date: Thu, 12 Dec 2019 08:44:22 -0500 Message-ID: <26141.1576158262@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > This only happens on some runs (in my case the CREATE INDEX passed 8x > without any issue and failed on 9th iteration), so there has to be some > random element affecting this. As far as that goes, gistchoose() intentionally makes random choices when two insertion paths seem equally good. So failing only sometimes isn't very surprising. > so maybe the GIST stack is stale, not updated, or something like that. I > think I've seen an issue mentioning that recently ... yep, found it [1]. > And I see Tom came to about the same conclusion, pointing to the same > place in gistfinishsplit. It's only a couple days old, I don't think > I've seen any proposed fixes yet. Good that we seem to have just one bug there not two :-(. I've not looked any further than my previous message, though. I wonder if this could be a recently-introduced bug? I do not recall seeing complaints like this before v12. regards, tom lane