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 1gwslf-0004oS-LV for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Feb 2019 18:08:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwslc-0007WU-9H for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Feb 2019 18:08:16 +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 1gwslc-0007Vy-22 for pgsql-hackers@lists.postgresql.org; Thu, 21 Feb 2019 18:08:16 +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 1gwslY-0005tW-8V for pgsql-hackers@postgresql.org; Thu, 21 Feb 2019 18:08:14 +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 x1LI80q1027683; Thu, 21 Feb 2019 13:08:00 -0500 From: Tom Lane To: Robert Haas cc: Arthur Zakirov , Tomas Vondra , Andres Freund , Pavel Stehule , pgsql-hackers Subject: Re: [PROPOSAL] Shared Ispell dictionaries In-reply-to: References: <27296.1522078068@sss.pgh.pa.us> <20180516113631.GA29544@zakirov.localdomain> <20180614084015.GA12451@zakirov.localdomain> <20181001092204.GA5071@zakirov.localdomain> <68aaaff6-0efe-c14b-7aee-fb110bb97f69@2ndquadrant.com> <337f7a55-58b8-4fcc-a933-5e7799fa6882@postgrespro.ru> <42b1ded6-fd44-5975-77e4-72ada1f134a2@2ndquadrant.com> <20190120222121.ehistvcr4wsu2su5@alap3.anarazel.de> <95aea959-97a1-2ded-c881-eede4e5a1f0c@2ndquadrant.com> <5113daa6-b6e7-59f6-c4a8-96b5b81474fb@postgrespro.ru> <1932084f-167a-8893-be24-c4c06afe113b@2ndquadrant.com> <26e59c3b-3598-cc2c-6b8d-81d24d6d0930@postgrespro.ru> <4c321! cb7-899f-0548-ecf4-5e965dd71335@postgrespro.ru> Comments: In-reply-to Robert Haas message dated "Thu, 21 Feb 2019 11:13:18 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27681.1550772480.1@sss.pgh.pa.us> Date: Thu, 21 Feb 2019 13:08:00 -0500 Message-ID: <27682.1550772480@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > Perhaps a better approach still would be to do what Andres proposed > back in March: > #> Is there any chance we can instead can convert dictionaries into a form > #> we can just mmap() into memory? That'd scale a lot higher and more > #> dynamicallly? That seems awfully attractive. I was about to question whether we could assume that mmap() works everywhere, but it's required by SUSv2 ... and if anybody has anything sufficiently lame for it not to work, we could fall back on malloc-a-hunk-of-memory-and-read-in-the-file. We'd need a bunch of work to design a position-independent binary representation for dictionaries, and then some tool to produce disk files containing that, so this isn't exactly a quick route to a solution. On the other hand, it isn't sounding like the current patch is getting close to committable either. (Actually, I guess you need a PI representation of a dictionary to put it in a DSM either, so presumably that part of the work is done already; although we might also wish for architecture independence of the disk files, which we probably don't have right now.) regards, tom lane