On Sun, Jan 5, 2014 at 1:44 PM, james <ja...@mansionfamily.plus.com> wrote: > I'm intrigued - how are the handles shared between children that are peers > in the current scheme? Some handle transfer must already be in place.
That's up to the application. After calling dsm_create(), you call dsm_segment_handle() to get the 32-bit integer handle for that segment. Then you have to get that to the other process(es) somehow. If you're trying to share a handle with a background worker, you can stuff it in bgw_main_arg. Otherwise, you'll probably need to store it in the main shared memory segment, or a file, or whatever. > Could you share the handles to an immortal worker if you want to reduce any > potential impact on the postmaster? You could, but this seems like this justification for spawning another process, and how immortal is that worker really? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers