Skip site navigation (1) Skip section navigation (2)

Re: postmaster.pid

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"Joerg Hessdoerfer" <Joerg(dot)Hessdoerfer(at)sea-gmbh(dot)com>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: postmaster.pid
Date: 2004-08-26 20:28:08
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE475B3D@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
>I've occasionally thought about abandoning the PID test, in favor of
>relying completely on the shmem-existence test.  If the shmem segment
>named in the lockfile doesn't exist or has zero processes connected to
>it, we could safely assume that the original postmaster is gone.
>(If it has processes connected, we must abort anyway, to cover the case
>where the postmaster crashed but backends remain alive.)  The risk here
>is that we are then *completely* at the mercy of the OS having 
>a correct
>emulation of the SysV shmem semantics, in particular the ability to
>detect whether a shmem segment has other processes connected to it.
>I'm not sure whether this is true on all the supported platforms.
>(This being the win32 list: what about Windows?)

You can try to attach to a segment if it exists. Or create a new one. It
goes away automatically when the last process referring it goes away.
(we're just doing named mmap of the pagefile). Not sure if the shmem
emualation is 100% complete on that, but it sure can be made so.

//Magnus

pgsql-hackers-win32 by date

Next:From: Robert TreatDate: 2004-08-26 21:18:42
Subject: Re: [pgsql-hackers-win32] Win32 release warning
Previous:From: Darcy BuskermolenDate: 2004-08-26 20:20:51
Subject: Re: [pgsql-hackers-win32] Win32 release warning

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group