Re: [HACKERS] why do shmem attach? - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] why do shmem attach?
Date
Msg-id 37E5DAFB.18D54027@krs.ru
Whole thread Raw
In response to RE: [HACKERS] why do shmem attach?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: [HACKERS] why do shmem attach?
Re: [HACKERS] why do shmem attach?
List pgsql-hackers
Hiroshi Inoue wrote:
> 
> Where do we attach to shmem after fork() ?
> I couldn't find the place.

Ops, sorry, you're right - postinit.c:InitCommunication():
   if (!IsUnderPostmaster)     /* postmaster already did this */   {       PostgresIpcKey = key;
AttachSharedMemoryAndSemaphores(key);  }
 

Though, AttachSharedMemoryAndSemaphores():
   if (key == PrivateIPCKey)   {         CreateSharedMemoryAndSemaphores(key, 16);       return;   }

... and useless shmem attachment stuff follows after this ...

Cleanup is still required, but subj is closed, thanks -:)

Vadim


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] why do shmem attach?
Next
From: Theo Kramer
Date:
Subject: Re: [HACKERS] Re: HISTORY for 6.5.2