Re:Detach shared memory in Postmaster child if not needed - Mailing list pgsql-hackers

From Rui Zhao
Subject Re:Detach shared memory in Postmaster child if not needed
Date
Msg-id 45c4aac4-d94a-4bdb-a6f3-3655d8351915.xiyuan.zr@alibaba-inc.com
Whole thread Raw
In response to Re: Detach shared memory in Postmaster child if not needed  (Aleksander Alekseev <aleksander@timescale.com>)
List 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Interrupts vs signals
Next
From: Tom Lane
Date:
Subject: Re: Detect double-release of spinlock