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 1iB2oC-00055u-KT for pgsql-committers@arkaria.postgresql.org; Thu, 19 Sep 2019 20:13:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iB2oB-0000R1-HC for pgsql-committers@arkaria.postgresql.org; Thu, 19 Sep 2019 20:13:43 +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 1iB2oB-0000Qp-A4 for pgsql-committers@lists.postgresql.org; Thu, 19 Sep 2019 20:13:43 +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 1iB2o9-0004f2-90; Thu, 19 Sep 2019 20:13:42 +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 x8JKDb9A002609; Thu, 19 Sep 2019 16:13:37 -0400 From: Tom Lane To: Erik Rijkers cc: Alexander Korotkov , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Improve handling of NULLs in KNN-GiST and KNN-SP-GiST In-reply-to: <6d51305e1159241cabee132f7efc7eff@xs4all.nl> References: <6d51305e1159241cabee132f7efc7eff@xs4all.nl> Comments: In-reply-to Erik Rijkers message dated "Thu, 19 Sep 2019 21:49:19 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2607.1568924017.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 19 Sep 2019 16:13:37 -0400 Message-ID: <2608.1568924017@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Erik Rijkers writes: > Oops: > create_index ... ok 634 ms > create_index_spgist ... FAILED 438 ms > create_view ... ok 329 ms I'm betting the issue is breaking the Datum abstraction here: - scan->xs_orderbyvals[i] =3D Float8GetDatum(distanceVal= ues[i]); + scan->xs_orderbyvals[i] =3D item->distances[i].value; AFAICS, item->distances[i].value is a double not a Datum, so dropping the Float8GetDatum call is just wrong. regards, tom lane