From: | "Rui Zhao" <xiyuan(dot)zr(at)alibaba-inc(dot)com> |
---|---|
To: | "Aleksander Alekseev" <aleksander(at)timescale(dot)com>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
Cc: | "hlinnaka" <hlinnaka(at)iki(dot)fi>, "robertmhaas" <robertmhaas(at)gmail(dot)com>, "tgl" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re:Detach shared memory in Postmaster child if not needed |
Date: | 2024-07-29 17:25:02 |
Message-ID: | 45c4aac4-d94a-4bdb-a6f3-3655d8351915.xiyuan.zr@alibaba-inc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks for your reply.
> Thanks for the patch. How do you estimate its performance impact?
In my patch, ony child processes that set
(child_process_kinds[child_type].shmem_attach == false)
will detach from shared memory.
Child processes with B_STANDALONE_BACKEND and B_INVALID don't call
postmaster_child_launch().
Therefore, currently, only the syslogger will be affected,
which should be harmless.
> Note the comments for postmaster_child_launch(). This function is
> exposed to the third-party code and guarantees to attach shared
> memory. I doubt that there is much third-party code in existence to
> break but you should change to comment.
Thank you for your reminder. My v2 patch will include the comments for
postmaster_child_launch().
--
Best regards,
Rui Zhao
Attachment | Content-Type | Size |
---|---|---|
0001-Detach-shared-memory-in-Postmaster-child-if-not-needed-v2.patch | application/octet-stream | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-07-29 17:25:22 | Re: Detect double-release of spinlock |
Previous Message | Tom Lane | 2024-07-29 17:24:21 | Re: Interrupts vs signals |