Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid
Date
Msg-id eUPnXaH0-lP5UPgJAeBbpVF-9I3A9TzxXyQOAsTBO4jmB1sFTzFs6vSwaRAnHTmoDo0wJ-EtuHeyM0vn1LO0xm6NPc_dR0dwOzg8dJrLqhU=@yesql.se
Whole thread Raw
In response to Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid  (Noah Misch <noah@leadboat.com>)
Responses Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid
List pgsql-hackers
On Monday, April 1, 2019 12:42 AM, Noah Misch <noah@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



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Enable data checksums by default
Next
From: Magnus Hagander
Date:
Subject: Re: Enable data checksums by default