On Monday, April 1, 2019 12:42 AM, Noah Misch <n...@leadboat.com> wrote: > On Fri, Mar 29, 2019 at 09:53:51AM +0000, Daniel Gustafsson wrote:
> > This seems like a case where it would be useful to log a shmdt() error or do > > an Assert() around the success of the operation perhaps? > > I'll add the same elog(LOG) we have at other shmdt() sites. I can't think of > a site where we Assert() about the results of a system call. While shmdt() > might be a justified exception, elog(LOG) seems reasonable. Agreed, seems reasonable. > > - - Loop till we find a free IPC key. Trust CreateDataDirLockFile() to > > - - ensure no more than one postmaster per data directory can enter this > > - - loop simultaneously. (CreateDataDirLockFile() does not ensure that, > > - - but prefer fixing it over coping here.) > > > > This comment make it seem like there is a fix to CreateLockFile() missing to > > his patch, is that correct? If so, do you have an idea for that patch? > > That comment refers to > https://postgr.es/m/flat/20120803145635.GE9683%40tornado.leadboat.com Gotcha, thanks for the clarification. cheers ./daniel