From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, Gaddam Sai Ram <gaddamsairam(dot)n(at)zohocorp(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Error: dsa_area could not attach to a segment that has been freed |
Date: | 2017-09-20 21:50:28 |
Message-ID: | CAEepm=0Q3F-mqzPoRe4ffpprWLNAeScZHobdHHeFtVoLoUKacw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 21, 2017 at 12:59 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Sep 20, 2017 at 5:54 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
>> By the way, dsa.c really needs a cross-reference to shm_toc.c and vice
>> versa. With a hint as to when each is appropriate.
>
> /me blinks.
>
> Aren't those almost-entirely-unrelated facilities?
I think I see what Craig means.
1. A DSM segment works if you know how much space you'll need up
front so that you can size it. shm_toc provides a way to exchange
pointers into it with other backends in the form of shm_toc keys
(perhaps implicitly, in the form of well known keys or a convention
like executor node ID -> shm_toc key). Examples: Fixed sized state
for parallel-aware executor nodes, and fixed size parallel executor
infrastructure.
2. A DSA area is good if you don't know how much space you'll need
yet. dsa_pointer provides a way to exchange pointers into it with
other backends. Examples: A shared cache, an in-memory database
object like Gaddam Sai Ram's graph index extension, variable sized
state for parallel-aware executor nodes, the shared record typmod
registry stuff.
Perhaps confusingly we also support DSA areas inside DSM segments,
there are DSM segments inside DSA areas. We also use DSM segments as
a kind of shared resource cleanup mechanism, and don't yet provide an
equivalent for DSA. I haven't proposed anything like that because I
feel like there may be a better abstraction of reliable scoped cleanup
waiting to be discovered (as I think Craig was also getting at).
--
Thomas Munro
http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Nikita Glukhov | 2017-09-20 21:57:49 | Re: compress method for spgist - 2 |
Previous Message | Tom Lane | 2017-09-20 21:34:56 | PSA: don't be in a hurry to update to XCode 9.0 |