From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Support worker_spi to execute the function dynamically. |
Date: | 2023-07-20 09:39:04 |
Message-ID: | CALj2ACUuceutw_U-DC4zTikrhKDbLr8P=gwTYHDnGKO8BaQbOw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 20, 2023 at 2:59 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Thu, Jul 20, 2023 at 05:54:55PM +0900, Masahiro Ikeda wrote:
> > Yes, you're right. When I tried using worker_spi to test wait event,
> > I found the behavior. And thanks a lot for your patch. I wasn't aware
> > of the way. I'll merge your patch to the tests for wait events.
>
> Be careful when using that. I have not spent more than a few minutes
> to show my point, but what I sent lacks a shmem_request_hook in
> _PG_init(), for example, to request an amount of shared memory equal
> to the size of the state structure.
I think the preferred way to grab a chunk of shared memory for an
external module is by using shmem_request_hook and shmem_startup_hook.
Wait events shared memory too can use them.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2023-07-20 09:52:11 | Re: Extracting cross-version-upgrade knowledge from buildfarm client |
Previous Message | Michael Paquier | 2023-07-20 09:29:10 | Re: Support worker_spi to execute the function dynamically. |