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

Win32 processCancelRequest/waitpid (was fork/exec patch: pre-CreateProcess finalization)

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>,'Tom Lane ' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 'Bruce Momjian ' <pgman(at)candle(dot)pha(dot)pa(dot)us>,'Jan Wieck ' <JanWieck(at)Yahoo(dot)com>,"'pgsql-patches(at)postgreSQL(dot)org '" <pgsql-patches(at)postgreSQL(dot)org>
Subject: Win32 processCancelRequest/waitpid (was fork/exec patch: pre-CreateProcess finalization)
Date: 2004-01-10 07:53:23
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F247@harris.memetrics.local (view raw or flat)
Thread:
Lists: pgsql-patches
I wrote:
> But I'll happily concede the point, and prove it by knocking 
> up a patch for it over the weekend (unless anyone else 
> particularly wants to).

Occurs to me I could kill 2 birds with one stone, and also implement another
Win32 sticking point, namely the waitpid changes for the Postmaster, by
having win32_forkexec do one of the following:

a) - when a backend startup is indicated, add a pid/cancel_key struct
(Backend) to this new array in shared mem
   - when any child of the postmaster is started, also add a pid/HANDLE
struct to a postmaster local array (or perhaps a dlllist)

b) - when any child of the postmaster is started, add a
pid/cancel_key/HANDLE/isBackend struct to this new array in shared mem

(HANDLE for waiting on to determine child death; isBackend to separate
BackendList backends from other children)

Choosing a over b:
	PRO: as we've already been through, keeps the postmaster-only data
local to the postmaster, stopping tampering from rouge backends
	CON: yet more redundancy

Given recent conversations, I'm guessing (a), but any comments before going
ahead and doing it?

Claudio

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

Responses

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-01-10 19:48:41
Subject: Re: Win32 processCancelRequest/waitpid (was fork/exec patch
Previous:From: Bruce MomjianDate: 2004-01-10 02:55:05
Subject: pg_ctl "starting" postmaster

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