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 1lhMsB-00027h-MH for pgsql-hackers@arkaria.postgresql.org; Fri, 14 May 2021 01:44:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhMsA-00055X-Ib for pgsql-hackers@arkaria.postgresql.org; Fri, 14 May 2021 01:44:14 +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 1lhMsA-00055P-BN for pgsql-hackers@lists.postgresql.org; Fri, 14 May 2021 01:44:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhMs8-0003CD-C6 for pgsql-hackers@lists.postgresql.org; Fri, 14 May 2021 01:44:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 14E1i7XQ1787102; Thu, 13 May 2021 21:44:08 -0400 From: Tom Lane To: Alvaro Herrera cc: Pavel Borisov , Dilip Kumar , PostgreSQL Hackers Subject: Re: OOM in spgist insert In-reply-to: <1785221.1620954078@sss.pgh.pa.us> References: <20210513224933.GA20201@alvherre.pgsql> <1785221.1620954078@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 13 May 2021 21:01:18 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <1787070.1620956615.0@sss.pgh.pa.us> Date: Thu, 13 May 2021 21:44:07 -0400 Message-ID: <1787101.1620956647@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1787070.1620956615.1@sss.pgh.pa.us> I wrote: > Anyway, here is a patch set teased apart into committable bites, > and with your other points addressed. Oh, maybe some docs would be a good thing too ... regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="0004-add-some-docs.patch"; charset="us-ascii" Content-ID: <1787070.1620956615.2@sss.pgh.pa.us> Content-Description: 0004-add-some-docs.patch diff --git a/doc/src/sgml/spgist.sgml b/doc/src/sgml/spgist.sgml index cfb2b3c836..18f1f3cdbd 100644 --- a/doc/src/sgml/spgist.sgml +++ b/doc/src/sgml/spgist.sgml @@ -978,6 +978,18 @@ LANGUAGE C STRICT; fails to do that, the SP-GiST core resorts to extraordinary measures described in . + + + When longValuesOK is true, it is expected + that successive levels of the SP-GiST tree will + absorb more and more information into the prefixes and node labels of + the inner tuples, making the required leaf datum smaller and smaller, + so that eventually it will fit on a page. + To prevent bugs in operator classes from causing infinite insertion + loops, the SP-GiST core will raise an error if the + leaf datum does not become any smaller within ten cycles + of choose method calls. + ------- =_aaaaaaaaaa0--