pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Arthur Zakirov <a.zakirov@postgrespro.ru>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PROPOSAL] Shared Ispell dictionaries
Date: Mon, 25 Feb 2019 14:33:10 +0300
Message-ID: <5902bb0c-b3aa-acc4-4324-e33735c4e5a8@postgrespro.ru> (raw )
In-Reply-To: <CA+TgmoZfmJ1TJ3J3bDcfZA2ESSudK7RAaBpDG3Fp5naMzzyK6A@mail.gmail.com >
References: <27296.1522078068@sss.pgh.pa.us >
<20180614084015.GA12451@zakirov.localdomain >
<20181001092204.GA5071@zakirov.localdomain >
<68aaaff6-0efe-c14b-7aee-fb110bb97f69@2ndquadrant.com >
<337f7a55-58b8-4fcc-a933-5e7799fa6882@postgrespro.ru >
<e0a25563-cbb1-7089-8c25-44668cfb031b@postgrespro.ru >
<42b1ded6-fd44-5975-77e4-72ada1f134a2@2ndquadrant.com >
<20190120222121.ehistvcr4wsu2su5@alap3.anarazel.de >
<95aea959-97a1-2ded-c881-eede4e5a1f0c@2ndquadrant.com >
<cad38cdb-2bb1-da75-235f-2e6684826f10@postgrespro.ru >
<b9e470f7-01b5-bf8c-78fc-5633ebc6fa2e@2ndquadrant.com >
<5113daa6-b6e7-59f6-c4a8-96b5b81474fb@postgrespro.ru >
<CAKNkYnyPxoByX0W7fUy=2NPvn880+DW3YZ5tBrFiV4cOaBX1xQ@mail.gmail.com >
<1932084f-167a-8893-be24-c4c06afe113b@2ndquadrant.com >
<26e59c3b-3598-cc2c-6b8d-81d24d6d0930@postgrespro.ru >
<CA+TgmoYiWVvgUrDBJXVG9Crpg=s=Y1BLhMwVd1RZQOq5aF4Ctw@mail.gmail.com >
<4c321cb7-899f-0548-ecf4-5e965dd71335@postgrespro.ru >
<CA+TgmoZfmJ1TJ3J3bDcfZA2ESSudK7RAaBpDG3Fp5naMzzyK6A@mail.gmail.com >
On 21.02.2019 19:13, Robert Haas wrote:
> So I think it's better to have each backend locally make a decision
> about when that particular backend no longer needs the dictionary, and
> then let the system automatically clean up the ones that are needed by
> nobody.
Yep, it wouldn't be hard to implement.
> 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?
>
> The current approach inherently involves double-buffering: you've got
> the filesystem cache containing the data read from disk, and then the
> DSM containing the converted form of the data. Having something that
> you could just mmap() would avoid that, plus it would become a lot
> less critical to keep the mappings around. You could probably just
> have individual queries mmap() it for as long as they need it and then
> tear out the mapping when they finish executing; keeping the mappings
> across queries likely wouldn't be too important in this case.
>
> The downside is that you'd probably need to teach resowner.c about
> mappings created via mmap() so that you don't leak mappings on an
> abort, but that's probably not a crazy difficult problem.
It seems to me Tom and Andres also vote for the mmap() approach. I think
I need to look closely at the mmap().
I've labeled the patch as 'v13'.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
view thread (108+ messages) latest in thread
Message-ID: <5902bb0c-b3aa-acc4-4324-e33735c4e5a8@postgrespro.ru>
Permalink: ../5902bb0c-b3aa-acc4-4324-e33735c4e5a8@postgrespro.ru/
Also on: postgresql.org/message-id/5902bb0c-b3aa-acc4-4324-e33735c4e5a8@postgrespro.ru
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: a.zakirov@postgrespro.ru, robertmhaas@gmail.com, tomas.vondra@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us, pavel.stehule@gmail.com
Subject: Re: [PROPOSAL] Shared Ispell dictionaries
In-Reply-To: <5902bb0c-b3aa-acc4-4324-e33735c4e5a8@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox