From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fast DSM segments |
Date: | 2020-06-18 06:05:50 |
Message-ID: | CA+hUKGKc5NZDnp2iov70N32gbWNjTo1y42wC=gp=mwkaYFungA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 11, 2020 at 5:37 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Jun 9, 2020 at 6:03 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> > That all makes sense. Now I'm wondering if I should use exactly that
> > word in the GUC... dynamic_shared_memory_preallocate?
>
> I tend to prefer verb-object rather than object-verb word ordering,
> because that's how English normally works, but I realize this is not a
> unanimous view.
It's pretty much just me and Yoda against all the rest of you, so
let's try preallocate_dynamic_shared_memory. I guess it could also be
min_dynamic_shared_memory to drop the verb. Other ideas welcome.
> It's a little strange because the fact of preallocating it makes it
> not dynamic any more. I don't know what to do about that.
Well, it's not dynamic at the operating system level, but it's still
dynamic in the sense that PostgreSQL code can get some and give it
back, and there's no change from the point of view of any DSM client
code.
Admittedly, the shared memory architecture is a bit confusing. We
have main shared memory, DSM memory, DSA memory that is inside main
shared memory with extra DSMs as required, DSA memory that is inside a
DSM and creates extra DSMs as required, and with this patch also DSMs
that are inside main shared memory. Not to mention palloc and
MemoryContexts and all that. As you probably remember I once managed
to give an internal presentation at EDB for one hour of solid talking
about all the different kinds of allocators and what they're good for.
It was like a Möbius slide deck already.
Here's a version that adds some documentation.
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Preallocate-some-DSM-space-at-startup.patch | text/x-patch | 18.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2020-06-18 06:22:16 | Re: min_safe_lsn column in pg_replication_slots view |
Previous Message | Fujii Masao | 2020-06-18 05:54:47 | Re: Review for GetWALAvailability() |