Re: file-locking and postmaster.pid

From: korry <korry(at)appx(dot)com>
To: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: file-locking and postmaster.pid
Date: 2006-05-24 20:01:43
Message-ID: 1148500903.21335.51.camel@sakai.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Wednesday 24 May 2006 21:03, korry wrote:
> > > I'm sure there's a good reason for having it the way it is, having so
> > > many smart knowledgeable people working on this project. Could someone
> > > please explain the rationale of the current solution to me?
> >
> > We've ignored Andreas' original question. Why not use a lock to
> > indicate that the postmaster is still running? At first blush, that
> > seems more reliable than checking for a (possibly recycled) process ID.
>
> As Tom replied: Portability.

Thanks - I missed that part of Tom's message.

The only platform (although certainly not a minor issue) that I can
think of that would have a portability issue would be Win32. You can't
even read a locked byte in Win32. I usually solve that problem by
locking a byte past the end of the file (which is portable).

Is there some other portability issue that I'm missing?

-- Korry

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-05-24 20:06:36 Re: file-locking and postmaster.pid
Previous Message Andreas Joseph Krogh 2006-05-24 19:33:27 Re: file-locking and postmaster.pid